Remove unused enums and simplify test assertions

This commit is contained in:
timfish
2019-10-09 12:06:32 +01:00
parent 1999120298
commit 4217e96d19
23 changed files with 177 additions and 447 deletions

View File

@@ -4,15 +4,12 @@ use rhai::Engine;
fn test_string() {
let mut engine = Engine::new();
if let Ok(result) = engine.eval::<String>("\"Test string: \\u2764\"") {
assert_eq!(result, "Test string: ");
} else {
assert!(false);
}
if let Ok(result) = engine.eval::<String>("\"foo\" + \"bar\"") {
assert_eq!(result, "foobar");
} else {
assert!(false);
}
assert_eq!(
engine.eval::<String>("\"Test string: \\u2764\""),
Ok("Test string: ❤".to_string())
);
assert_eq!(
engine.eval::<String>("\"foo\" + \"bar\""),
Ok("foobar".to_string())
);
}