ganit-core 0.3.2

Spreadsheet formula engine — parser and evaluator for Excel-compatible formulas
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use super::super::*;
use crate::types::Value;

#[test]
fn result_is_reasonable_upper_bound() {
    // Sanity: the result should not be unreasonably large (e.g., > serial for 2100-01-01 ≈ 73051).
    if let Value::Date(n) = today_fn(&[]) {
        assert!(n < 73051.0, "today serial {n} seems unreasonably large");
    } else {
        panic!("expected Date");
    }
}