From 5435fdb8c8b4875149e5e9d8cbd8b34eb4988e82 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sat, 21 May 2022 11:57:23 +0800 Subject: [PATCH] Fix tests. --- CHANGELOG.md | 2 +- tests/modules.rs | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 462bc2ab..0d0b8329 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 ---------------- diff --git a/tests/modules.rs b/tests/modules.rs index d6bacf3f..d80fcfba 100644 --- a/tests/modules.rs +++ b/tests/modules.rs @@ -285,12 +285,16 @@ fn test_module_resolver() -> Result<(), Box> { let mut ast2 = engine.compile("fn foo(x) { 42 }")?; + #[cfg(feature = "internals")] let len = ast.resolver().unwrap().len(); ast2 += ast; - assert!(ast2.resolver().is_some()); - assert_eq!(ast2.resolver().unwrap().len(), len); + #[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,))?;