ganit-core 0.3.9

Spreadsheet formula engine — parser and evaluator for Excel-compatible formulas
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::super::not_fn;
use crate::types::{ErrorKind, Value};

#[test]
fn text_returns_value_error() {
    assert_eq!(not_fn(&[Value::Text("hello".to_string())]), Value::Error(ErrorKind::Value));
}

#[test]
fn empty_returns_value_error() {
    assert_eq!(not_fn(&[Value::Empty]), Value::Error(ErrorKind::Value));
}

#[test]
fn too_many_args_returns_value_error() {
    assert_eq!(not_fn(&[Value::Bool(true), Value::Bool(false)]), Value::Error(ErrorKind::NA));
}