diff --git a/compiler/test_gen/src/gen_num.rs b/compiler/test_gen/src/gen_num.rs index 377e99bbff..7b13747a5f 100644 --- a/compiler/test_gen/src/gen_num.rs +++ b/compiler/test_gen/src/gen_num.rs @@ -1845,18 +1845,28 @@ fn shift_left_by() { #[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] fn shift_right_by() { // Sign Extended Right Shift - assert_evals_to!("Num.shiftRightBy 2 0b0100_0000i8", 0b0001_0000, i8); - assert_evals_to!("Num.shiftRightBy 1 0b1110_0000u8", 0b1111_0000u8 as i8, i8); - assert_evals_to!("Num.shiftRightBy 2 0b1100_0000u8", 0b1111_0000u8 as i8, i8); + assert_evals_to!( + "Num.shiftRightBy 2 (Num.toI8 0b1100_0000u8)", + 0b1111_0000u8 as i8, + i8 + ); + assert_evals_to!("Num.shiftRightBy 2 0b0100_0000i8", 0b0001_0000i8, i8); + assert_evals_to!("Num.shiftRightBy 1 0b1110_0000u8", 0b1111_0000u8, u8); + assert_evals_to!("Num.shiftRightBy 2 0b1100_0000u8", 0b1111_0000u8, u8); } #[test] #[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))] fn shift_right_zf_by() { // Logical Right Shift - assert_evals_to!("Num.shiftRightZfBy 2 0b1100_0000u8", 0b0011_0000, i64); - assert_evals_to!("Num.shiftRightZfBy 1 0b0000_0010u8", 0b0000_0001, i64); - assert_evals_to!("Num.shiftRightZfBy 2 0b0000_1100u8", 0b0000_0011, i64); + assert_evals_to!( + "Num.shiftRightZfBy 2 (Num.toI8 0b1100_0000u8)", + 0b0011_0000i8, + i8 + ); + assert_evals_to!("Num.shiftRightZfBy 2 0b1100_0000u8", 0b0011_0000u8, u8); + assert_evals_to!("Num.shiftRightZfBy 1 0b0000_0010u8", 0b0000_0001u8, u8); + assert_evals_to!("Num.shiftRightZfBy 2 0b0000_1100u8", 0b0000_0011u8, u8); } #[test]