rhai/tests/mismatched_op.rs

14 lines
277 B
Rust
Raw Normal View History

extern crate rhai;
use rhai::{Engine, EvalAltResult};
2017-11-03 17:58:51 +01:00
#[test]
fn test_mismatched_op() {
let mut engine = Engine::new();
2017-12-20 21:09:53 +01:00
assert_eq!(
engine.eval::<i64>("60 + \"hello\""),
Err(EvalAltResult::ErrorFunctionNotFound("+ (integer,string)".into()))
2017-12-20 21:09:53 +01:00
);
2017-11-03 17:58:51 +01:00
}