Fix features.
This commit is contained in:
@@ -35,6 +35,7 @@ fn test_max_string_size() -> Result<(), Box<EvalAltResult>> {
|
||||
EvalAltResult::ErrorDataTooLarge(_, 10, 13, _)
|
||||
));
|
||||
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
assert!(matches!(
|
||||
*engine
|
||||
.eval::<String>(
|
||||
@@ -92,6 +93,8 @@ fn test_max_array_size() -> Result<(), Box<EvalAltResult>> {
|
||||
.expect_err("should error"),
|
||||
EvalAltResult::ErrorDataTooLarge(_, 10, 12, _)
|
||||
));
|
||||
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
assert!(matches!(
|
||||
*engine
|
||||
.eval::<Array>(
|
||||
|
@@ -39,7 +39,7 @@ fn test_for_string() -> Result<(), Box<EvalAltResult>> {
|
||||
let sum = 0;
|
||||
|
||||
for ch in s {
|
||||
sum += ch.to_int();
|
||||
sum += to_int(ch);
|
||||
}
|
||||
|
||||
sum
|
||||
|
@@ -52,6 +52,7 @@ fn test_functions() -> Result<(), Box<EvalAltResult>> {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
fn test_function_pointers() -> Result<(), Box<EvalAltResult>> {
|
||||
let engine = Engine::new();
|
||||
|
||||
|
Reference in New Issue
Block a user