Fine tune some tests.

This commit is contained in:
Stephen Chung
2020-03-12 12:35:30 +08:00
parent 0d1a240292
commit 4662b9bd0c
2 changed files with 19 additions and 19 deletions

View File

@@ -42,7 +42,15 @@ fn test_scope_eval() -> Result<(), EvalAltResult> {
println!("result: {}", result); // should print 966
// Variable y is changed in the script
assert_eq!(scope.get_value::<INT>("y").unwrap(), 1);
assert_eq!(
scope
.get_value::<INT>("y")
.ok_or(EvalAltResult::ErrorRuntime(
"variable y not found".into(),
Default::default()
))?,
1
);
Ok(())
}