truecalc-core 1.0.1

Spreadsheet formula engine — parser and evaluator for Excel-compatible formulas
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::super::*;
use crate::eval::functions::{EvalCtx, Registry};
use crate::eval::Context;
use crate::parser::ast::{Expr, Span};
use crate::types::{ErrorKind, Value};

#[test]
fn too_many_args() {
    let registry = Registry::new();
    let mut eval_ctx = EvalCtx::new(Context::empty(), &registry);
    let arg = Expr::Number(0.0, Span::new(0, 0));
    assert_eq!(today_fn(&[arg], &mut eval_ctx), Value::Error(ErrorKind::NA));
}