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

@@ -29,11 +29,10 @@ fn test_get_set() {
engine.register_get_set("x", TestStruct::get_x, TestStruct::set_x);
engine.register_fn("new_ts", TestStruct::new);
if let Ok(result) = engine.eval::<i64>("let a = new_ts(); a.x = 500; a.x") {
assert_eq!(result, 500);
} else {
assert!(false);
}
assert_eq!(
engine.eval::<i64>("let a = new_ts(); a.x = 500; a.x"),
Ok(500)
);
}
#[test]