Fix no_function build.

This commit is contained in:
Stephen Chung 2021-10-29 18:14:07 +08:00
parent 11f180bd4e
commit 5e275d4593

View File

@ -44,6 +44,7 @@ fn test_functions_namespaces() -> Result<(), Box<EvalAltResult>> {
let mut engine = Engine::new(); let mut engine = Engine::new();
#[cfg(not(feature = "no_function"))] #[cfg(not(feature = "no_function"))]
#[cfg(not(feature = "no_module"))]
{ {
assert_eq!( assert_eq!(
engine.eval::<INT>( engine.eval::<INT>(
@ -81,6 +82,7 @@ fn test_functions_namespaces() -> Result<(), Box<EvalAltResult>> {
assert_eq!(engine.eval::<INT>("test()")?, 42); assert_eq!(engine.eval::<INT>("test()")?, 42);
#[cfg(not(feature = "no_function"))] #[cfg(not(feature = "no_function"))]
#[cfg(not(feature = "no_module"))]
{ {
assert_eq!(engine.eval::<INT>("fn test() { 123 } test()")?, 123); assert_eq!(engine.eval::<INT>("fn test() { 123 } test()")?, 123);