Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Aug 28, 2024
1 parent 225eb1e commit 38d4185
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions compiler/noirc_evaluator/src/ssa/function_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ mod tests {
fn insert_constant_call() {
// `bits` should be an array of constants [1, 1, 1, 0...] of length 8:
// let x = 7;
// let bits = x.to_le_bits(8);
// let bits: [u1; 8] = x.to_le_bits();
let func_id = Id::test_new(0);
let mut builder = FunctionBuilder::new("func".into(), func_id);
let one = builder.numeric_constant(FieldElement::one(), Type::bool());
Expand All @@ -546,13 +546,7 @@ mod tests {
let call_results =
builder.insert_call(to_bits_id, vec![input, length], result_types).into_owned();

let slice_len = match &builder.current_function.dfg[call_results[0]] {
Value::NumericConstant { constant, .. } => *constant,
_ => panic!(),
};
assert_eq!(slice_len, FieldElement::from(8_u128));

let slice = match &builder.current_function.dfg[call_results[1]] {
let slice = match &builder.current_function.dfg[call_results[0]] {
Value::Array { array, .. } => array,
_ => panic!(),
};
Expand Down

0 comments on commit 38d4185

Please sign in to comment.