Skip to content

Commit

Permalink
chore: use proper Intrinsic for println in DIE test
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Aug 15, 2023
1 parent e9fe52d commit 6f24de7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions crates/noirc_evaluator/src/ssa/opt/die.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ impl Context {
#[cfg(test)]
mod test {
use crate::ssa::{
ir::{function::RuntimeType, instruction::BinaryOp, map::Id, types::Type},
ir::{
function::RuntimeType,
instruction::{BinaryOp, Intrinsic},
map::Id,
types::Type,
},
ssa_builder::FunctionBuilder,
};

Expand All @@ -154,7 +159,6 @@ mod test {
// return v9
// }
let main_id = Id::test_new(0);
let println_id = Id::test_new(1);

// Compiling main
let mut builder = FunctionBuilder::new("main".into(), main_id, RuntimeType::Acir);
Expand Down Expand Up @@ -182,6 +186,8 @@ mod test {
let v9 = builder.insert_binary(v7, BinaryOp::Add, two);
let v10 = builder.insert_binary(v7, BinaryOp::Add, three);
let _v11 = builder.insert_binary(v10, BinaryOp::Add, v10);

let println_id = builder.import_intrinsic_id(Intrinsic::Println);
builder.insert_call(println_id, vec![v8], vec![]);
builder.terminate_with_return(vec![v9]);

Expand Down

0 comments on commit 6f24de7

Please sign in to comment.