Skip to content

Commit

Permalink
fix(test): ir display problem on int constant
Browse files Browse the repository at this point in the history
  • Loading branch information
JuniMay committed Jul 24, 2024
1 parent e272145 commit f8fec3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/ir_display/snapshot_0.orzir
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Just a test function
func @test /* 0 */ () -> void {
^bb0 /* 0 */ :
%v0 /* 2, uses: 4 */ = iconst 0x00000001i32 : i32
%v0 /* 2, uses: 4 */ = iconst 0x1i32 : i32
%v1 /* 3, uses: 2 */ = fconst 0x40000000 : f32
%dummy_cond /* 4, uses: 1 */ = iconst 0x00000001i32 : i1
%dummy_cond /* 4, uses: 1 */ = iconst 0x1i1 : i1
/* no result */ br %dummy_cond, ^bb1, ^bb2

^bb1 /* 1 */ :
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ir_inst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ fn test_ir_display_0() {
ctx.alloc_all_names();

let s = format!("{}", i1.display(&ctx, true));
assert_eq!(s, "%v0 /* 0, uses: 0 */ = iconst 0x00000001i32 : i32");
assert_eq!(s, "%v0 /* 0, uses: 0 */ = iconst 0x1i32 : i32");

let s = format!("{}", i2.display(&ctx, true));
assert_eq!(s, "%second /* 1, uses: 0 */ = iconst 0x00000002i32 : i32");
assert_eq!(s, "%second /* 1, uses: 0 */ = iconst 0x2i32 : i32");

let s = format!("{}", f1.display(&ctx, true));
let hex_1_0 = format!("0x{:08x}", f32::to_bits(1.0));
Expand Down

0 comments on commit f8fec3d

Please sign in to comment.