UPDATE: Update README to include a minimal ROADMAD

This commit is contained in:
Nicolás Hatcher
2023-12-01 08:53:12 +01:00
parent c5b8efd83d
commit c63acd72d0
8 changed files with 229 additions and 11 deletions

View File

@@ -0,0 +1,18 @@
#![allow(clippy::unwrap_used)]
use crate::test::util::new_empty_model;
#[test]
fn test_formulas() {
let mut model = new_empty_model();
model.set_user_input(0, 1, 1, "$100.348".to_string());
model.set_user_input(0, 1, 2, "=ISNUMBER(A1)".to_string());
model.evaluate();
assert_eq!(model.get_cell_content(0, 1, 1).unwrap(), "100.348");
assert_eq!(model.get_cell_content(0, 1, 2).unwrap(), "=ISNUMBER(A1)");
assert_eq!(model.get_cell_content(0, 5, 5).unwrap(), "");
assert!(model.get_cell_content(1, 1, 2).is_err());
}