Skip to content

Commit 6d5eaba

Browse files
committed
test(integration): add iter-eq repro with red show snapshot
1 parent 4439c3d commit 6d5eaba

3 files changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
fn main() {
2+
let _keep: fn() -> bool = repro;
3+
}
4+
5+
#[inline(never)]
6+
#[no_mangle]
7+
pub fn repro() -> bool {
8+
let k0 = Pubkey([1; 32]);
9+
let k1 = Pubkey([2; 32]);
10+
let k2 = Pubkey([3; 32]);
11+
let n = 2usize;
12+
13+
let accounts = [
14+
AccountInfo { key: &k0 },
15+
AccountInfo { key: &k1 },
16+
AccountInfo { key: &k2 },
17+
];
18+
let signers = [k1, k2, k0];
19+
20+
accounts[1..]
21+
.iter()
22+
.map(|signer| *signer.key)
23+
.eq(signers.iter().take(n).copied())
24+
}
25+
26+
#[derive(Clone)]
27+
struct AccountInfo<'a> {
28+
key: &'a Pubkey,
29+
}
30+
31+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
32+
struct Pubkey([u8; 32]);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
┌─ 1 (root, init)
3+
│ #execTerminator ( terminator ( ... kind: terminatorKindCall ( ... func: operandC
4+
│ span: 0
5+
6+
│ (1947 steps)
7+
└─ 3 (stuck, leaf)
8+
#traverseProjection ( toLocal ( 1 ) , thunk ( operandCopy ( place ( ... local: l
9+
span: 30
10+
11+
12+
┌─ 2 (root, leaf, target, terminal)
13+
│ #EndProgram ~> .K
14+
15+

kmir/src/tests/integration/test_integration.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
'closure-fnonce-single-arg': ['repro'],
4242
'iter-copied-take-next-thunk-regression': ['repro'],
4343
'iter-map-eq-copied-take-thunk-frontier-fail': ['repro'],
44+
'iter-eq-copied-take-dereftruncate-fail': ['repro'],
4445
}
4546
PROVE_RS_SHOW_SPECS = [
4647
'local-raw-fail',
@@ -60,6 +61,7 @@
6061
'transmute-u8-to-enum-changed-discriminant-signed-fail',
6162
'assert-inhabited-fail',
6263
'iterator-simple',
64+
'iter-eq-copied-take-dereftruncate-fail',
6365
'unions-fail',
6466
'transmute-maybe-uninit-fail',
6567
'ptr-through-wrapper-fail',

0 commit comments

Comments
 (0)