Fix tests.

This commit is contained in:
Stephen Chung 2022-05-21 11:57:23 +08:00
parent 9c1a49da0b
commit 5435fdb8c8
2 changed files with 7 additions and 3 deletions

View File

@ -10,7 +10,7 @@ Bug fixes
* Self-contained `AST` now works properly with `Engine::call_fn`.
* Missing `to_int` from `Decimal` is added.
* Parsing of index expressions is relaxed and many cases no longer result in an index-type error to allow for custom indexers.
* Merging a self-contained `AST` into another `AST` now works properly.
* Merging or combining a self-contained `AST` into another `AST` now works properly.
Deprecated API's
----------------

View File

@ -285,12 +285,16 @@ fn test_module_resolver() -> Result<(), Box<EvalAltResult>> {
let mut ast2 = engine.compile("fn foo(x) { 42 }")?;
#[cfg(feature = "internals")]
let len = ast.resolver().unwrap().len();
ast2 += ast;
#[cfg(feature = "internals")]
{
assert!(ast2.resolver().is_some());
assert_eq!(ast2.resolver().unwrap().len(), len);
}
let result: INT = engine.call_fn(&mut Scope::new(), &ast2, "foo", (2 as INT,))?;