ganit-core 0.1.1

Spreadsheet formula engine — parser and evaluator for Excel-compatible formulas
Documentation
use super::super::*;
use crate::types::{ErrorKind, Value};

#[test]
fn wrong_arity_no_args() {
    assert_eq!(upper_fn(&[]), Value::Error(ErrorKind::Value));
}

#[test]
fn wrong_arity_too_many() {
    assert_eq!(
        upper_fn(&[Value::Text("a".to_string()), Value::Text("b".to_string())]),
        Value::Error(ErrorKind::Value)
    );
}

#[test]
fn error_propagated() {
    assert_eq!(
        upper_fn(&[Value::Error(ErrorKind::Num)]),
        Value::Error(ErrorKind::Num)
    );
}