Fix test.

This commit is contained in:
Stephen Chung 2020-06-26 23:24:35 +08:00
parent ab347fa14e
commit 588150e217

View File

@ -38,19 +38,13 @@ fn test_optimizer_parse() -> Result<(), Box<EvalAltResult>> {
let ast = engine.compile("{ const DECISION = false; if DECISION { 42 } }")?;
assert_eq!(
format!("{:?}", ast),
"AST([], <module vars={}, functions=0>)"
);
assert!(format!("{:?}", ast).starts_with("AST([], "));
engine.set_optimization_level(OptimizationLevel::Full);
let ast = engine.compile("if 1 == 2 { 42 }")?;
assert_eq!(
format!("{:?}", ast),
"AST([], <module vars={}, functions=0>)"
);
assert!(format!("{:?}", ast).starts_with("AST([], "));
Ok(())
}