Skip to content

Commit 95bdc47

Browse files
authored
fix: Rename widen insta tests (#1949)
The last PR (#1946) introduced some non-deterministic behaviour in the `cargo-insta` tests, due to the fact that multiple tests had the same name so multiple outputs were written to the same file.
1 parent 6bd970b commit 95bdc47

10 files changed

+77
-29
lines changed

hugr-llvm/src/extension/int.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ mod test {
470470
.unwrap();
471471
let hugr = test_int_op_with_results::<1>(ext_op, from, None, out_ty.into());
472472

473-
check_emission!(op.clone(), hugr, llvm_ctx);
473+
check_emission!(format!("{}_{}_{}", op.clone(), from, to), hugr, llvm_ctx);
474474
}
475475
#[rstest]
476476
#[case::ieq("ieq", 1)]

hugr-llvm/src/extension/snapshots/hugr_llvm__extension__int__test__inarrow_u@[email protected]

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
source: hugr-llvm/src/extension/int.rs
3+
expression: mod_str
4+
---
5+
; ModuleID = 'test_context'
6+
source_filename = "test_context"
7+
8+
define i64 @_hl.main.1(i8 %0) {
9+
alloca_block:
10+
br label %entry_block
11+
12+
entry_block: ; preds = %alloca_block
13+
%1 = zext i8 %0 to i64
14+
ret i64 %1
15+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
source: hugr-llvm/src/extension/int.rs
3+
expression: mod_str
4+
---
5+
; ModuleID = 'test_context'
6+
source_filename = "test_context"
7+
8+
define i64 @_hl.main.1(i8 %0) {
9+
alloca_block:
10+
%"0" = alloca i64, align 8
11+
%"2_0" = alloca i8, align 1
12+
%"4_0" = alloca i64, align 8
13+
br label %entry_block
14+
15+
entry_block: ; preds = %alloca_block
16+
store i8 %0, i8* %"2_0", align 1
17+
%"2_01" = load i8, i8* %"2_0", align 1
18+
%1 = zext i8 %"2_01" to i64
19+
store i64 %1, i64* %"4_0", align 4
20+
%"4_02" = load i64, i64* %"4_0", align 4
21+
store i64 %"4_02", i64* %"0", align 4
22+
%"03" = load i64, i64* %"0", align 4
23+
ret i64 %"03"
24+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
source: hugr-llvm/src/extension/int.rs
3+
expression: mod_str
4+
---
5+
; ModuleID = 'test_context'
6+
source_filename = "test_context"
7+
8+
define i8 @_hl.main.1(i8 %0) {
9+
alloca_block:
10+
br label %entry_block
11+
12+
entry_block: ; preds = %alloca_block
13+
ret i8 %0
14+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
source: hugr-llvm/src/extension/int.rs
3+
expression: mod_str
4+
---
5+
; ModuleID = 'test_context'
6+
source_filename = "test_context"
7+
8+
define i8 @_hl.main.1(i8 %0) {
9+
alloca_block:
10+
%"0" = alloca i8, align 1
11+
%"2_0" = alloca i8, align 1
12+
%"4_0" = alloca i8, align 1
13+
br label %entry_block
14+
15+
entry_block: ; preds = %alloca_block
16+
store i8 %0, i8* %"2_0", align 1
17+
%"2_01" = load i8, i8* %"2_0", align 1
18+
store i8 %"2_01", i8* %"4_0", align 1
19+
%"4_02" = load i8, i8* %"4_0", align 1
20+
store i8 %"4_02", i8* %"0", align 1
21+
%"03" = load i8, i8* %"0", align 1
22+
ret i8 %"03"
23+
}

0 commit comments

Comments
 (0)