Fix tests.
This commit is contained in:
parent
9c1a49da0b
commit
5435fdb8c8
@ -10,7 +10,7 @@ Bug fixes
|
|||||||
* Self-contained `AST` now works properly with `Engine::call_fn`.
|
* Self-contained `AST` now works properly with `Engine::call_fn`.
|
||||||
* Missing `to_int` from `Decimal` is added.
|
* 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.
|
* 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
|
Deprecated API's
|
||||||
----------------
|
----------------
|
||||||
|
@ -285,12 +285,16 @@ fn test_module_resolver() -> Result<(), Box<EvalAltResult>> {
|
|||||||
|
|
||||||
let mut ast2 = engine.compile("fn foo(x) { 42 }")?;
|
let mut ast2 = engine.compile("fn foo(x) { 42 }")?;
|
||||||
|
|
||||||
|
#[cfg(feature = "internals")]
|
||||||
let len = ast.resolver().unwrap().len();
|
let len = ast.resolver().unwrap().len();
|
||||||
|
|
||||||
ast2 += ast;
|
ast2 += ast;
|
||||||
|
|
||||||
assert!(ast2.resolver().is_some());
|
#[cfg(feature = "internals")]
|
||||||
assert_eq!(ast2.resolver().unwrap().len(), len);
|
{
|
||||||
|
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,))?;
|
let result: INT = engine.call_fn(&mut Scope::new(), &ast2, "foo", (2 as INT,))?;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user