Fix no_function build.
This commit is contained in:
parent
11f180bd4e
commit
5e275d4593
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user