truecalc-core 3.2.0

Formula engine with exact Google Sheets semantics — stateless, embeddable evaluator
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::super::*;
use crate::types::{ErrorKind, Value};

#[test]
fn varp_no_args_returns_na() {
    assert_eq!(varp_fn(&[]), Value::Error(ErrorKind::NA));
}

#[test]
fn varp_direct_text_returns_value_error() {
    // Direct non-parseable text returns #VALUE! (not #DIV/0!)
    assert_eq!(
        varp_fn(&[Value::Text("a".to_string()), Value::Bool(false)]),
        Value::Error(ErrorKind::Value)
    );
}