Fix tests.

This commit is contained in:
Stephen Chung
2022-09-03 11:29:29 +08:00
parent fcdd2eb143
commit d7dfa1a218
2 changed files with 19 additions and 3 deletions

View File

@@ -77,11 +77,19 @@ fn test_native_overload() -> Result<(), Box<EvalAltResult>> {
assert_eq!(
engine.eval::<String>(r#"let x = "hello"; let y = "world"; x + y"#)?,
"hello***world"
if cfg!(not(feature = "fast_ops")) {
"hello***world"
} else {
"helloworld"
}
);
assert_eq!(
engine.eval::<String>(r#"let x = "hello"; let y = (); x + y"#)?,
"hello Foo!"
if cfg!(not(feature = "fast_ops")) {
"hello Foo!"
} else {
"hello"
}
);
Ok(())