update: adds unit test for SUMSQ
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
c8da5efb5f
commit
f814a75ae5
@@ -45,6 +45,7 @@ mod test_set_user_input;
|
|||||||
mod test_sheet_markup;
|
mod test_sheet_markup;
|
||||||
mod test_sheets;
|
mod test_sheets;
|
||||||
mod test_styles;
|
mod test_styles;
|
||||||
|
mod test_sumsq;
|
||||||
mod test_trigonometric;
|
mod test_trigonometric;
|
||||||
mod test_true_false;
|
mod test_true_false;
|
||||||
mod test_weekday_return_types;
|
mod test_weekday_return_types;
|
||||||
|
|||||||
17
base/src/test/test_sumsq.rs
Normal file
17
base/src/test/test_sumsq.rs
Normal 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");
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user