update: adds unit test for SUMSQ

This commit is contained in:
Elsa Minsut
2025-11-26 23:02:45 +01:00
committed by Nicolás Hatcher Andrés
parent c8da5efb5f
commit f814a75ae5
2 changed files with 18 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ mod test_set_user_input;
mod test_sheet_markup;
mod test_sheets;
mod test_styles;
mod test_sumsq;
mod test_trigonometric;
mod test_true_false;
mod test_weekday_return_types;

View File

@@ -0,0 +1,17 @@
#![allow(clippy::unwrap_used)]
use crate::test::util::new_empty_model;
#[test]
fn arguments() {
let mut model = new_empty_model();
model._set("A1", "=SUMSQ()");
model._set("A2", "=SUMSQ(2)");
model._set("A3", "=SUMSQ(1, 2)");
model.evaluate();
assert_eq!(model._get_text("A1"), *"#ERROR!");
assert_eq!(model._get_text("A2"), *"4");
assert_eq!(model._get_text("A3"), *"5");
}