ganit-core 0.4.0

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::*;
use crate::types::{ErrorKind, Value};

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

#[test]
fn too_many_args() {
    assert_eq!(month_fn(&[Value::Number(1.0), Value::Number(2.0)]), Value::Error(ErrorKind::NA));
}

#[test]
fn text_arg() {
    assert_eq!(month_fn(&[Value::Text("abc".to_string())]), Value::Error(ErrorKind::Value));
}