Fix test.
This commit is contained in:
parent
ab347fa14e
commit
588150e217
@ -38,19 +38,13 @@ fn test_optimizer_parse() -> Result<(), Box<EvalAltResult>> {
|
|||||||
|
|
||||||
let ast = engine.compile("{ const DECISION = false; if DECISION { 42 } }")?;
|
let ast = engine.compile("{ const DECISION = false; if DECISION { 42 } }")?;
|
||||||
|
|
||||||
assert_eq!(
|
assert!(format!("{:?}", ast).starts_with("AST([], "));
|
||||||
format!("{:?}", ast),
|
|
||||||
"AST([], <module vars={}, functions=0>)"
|
|
||||||
);
|
|
||||||
|
|
||||||
engine.set_optimization_level(OptimizationLevel::Full);
|
engine.set_optimization_level(OptimizationLevel::Full);
|
||||||
|
|
||||||
let ast = engine.compile("if 1 == 2 { 42 }")?;
|
let ast = engine.compile("if 1 == 2 { 42 }")?;
|
||||||
|
|
||||||
assert_eq!(
|
assert!(format!("{:?}", ast).starts_with("AST([], "));
|
||||||
format!("{:?}", ast),
|
|
||||||
"AST([], <module vars={}, functions=0>)"
|
|
||||||
);
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user