Add error test case for mismatched args
This commit is contained in:
parent
21c3b625d7
commit
65bf269843
@ -841,6 +841,16 @@ fn test_ops() {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mismatched_op() {
|
||||
let mut engine = Engine::new();
|
||||
|
||||
match engine.eval::<i32>("60 + \"hello\"") {
|
||||
Err(EvalAltResult::ErrorFunctionArgMismatch) => (),
|
||||
_ => assert!(false)
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bool_op1() {
|
||||
let mut engine = Engine::new();
|
||||
|
Loading…
Reference in New Issue
Block a user