Fix tests.

This commit is contained in:
Stephen Chung
2020-04-23 14:00:29 +08:00
parent 5aaaa7be3b
commit a306979a9c
3 changed files with 5 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ fn test_arrays() -> Result<(), Box<EvalAltResult>> {
);
assert!(engine.eval::<bool>("let y = [1, 2, 3]; 2 in y")?);
#[cfg(not(feature = "no_object"))]
assert_eq!(
engine.eval::<INT>(
r"
@@ -35,7 +36,7 @@ fn test_arrays() -> Result<(), Box<EvalAltResult>> {
r"
let x = [1, 2, 3];
x += [4, 5];
x.len()
len(x)
"
)?,
5

View File

@@ -31,6 +31,7 @@ fn test_for_array() -> Result<(), Box<EvalAltResult>> {
}
#[cfg(not(feature = "no_object"))]
#[cfg(not(feature = "no_index"))]
#[test]
fn test_for_object() -> Result<(), Box<EvalAltResult>> {
let engine = Engine::new();