Refine docs and tests.

This commit is contained in:
Stephen Chung
2020-07-06 16:20:03 +08:00
parent 3e45d5d9a5
commit 46cdec1280
7 changed files with 10 additions and 10 deletions

View File

@@ -7,7 +7,7 @@ fn test_var_scope() -> Result<(), Box<EvalAltResult>> {
engine.eval_with_scope::<()>(&mut scope, "let x = 4 + 5")?;
assert_eq!(engine.eval_with_scope::<INT>(&mut scope, "x")?, 9);
engine.eval_with_scope::<()>(&mut scope, "x = x + 1; x = x + 2;")?;
engine.eval_with_scope::<()>(&mut scope, "x += 1; x += 2;")?;
assert_eq!(engine.eval_with_scope::<INT>(&mut scope, "x")?, 12);
scope.set_value("x", 42 as INT);