Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
schungx committed Jan 30, 2024
1 parent db7466b commit bcb20cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/optimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ fn test_optimizer_volatile() {

engine.set_optimization_level(OptimizationLevel::Full);

FuncRegistration::new("foo").with_volatility(true).register_into_engine(&mut engine, |x: i64| x + 1);
FuncRegistration::new("foo").with_volatility(true).register_into_engine(&mut engine, |x: INT| x + 1);

let ast = engine.compile("foo(42)").unwrap();

Expand All @@ -209,11 +209,12 @@ fn test_optimizer_volatile() {
// Make sure the call is not optimized away
assert!(text_ast.contains(r#"name: "foo""#));

FuncRegistration::new("foo").with_volatility(false).register_into_engine(&mut engine, |x: i64| x + 1);
FuncRegistration::new("foo").with_volatility(false).register_into_engine(&mut engine, |x: INT| x + 1);

let ast = engine.compile("foo(42)").unwrap();

let text_ast = format!("{ast:?}");
println!("{text_ast:#?}");

// Make sure the call is optimized away
assert!(!text_ast.contains(r#"name: "foo""#));
Expand Down

0 comments on commit bcb20cd

Please sign in to comment.