Skip to content

Commit

Permalink
add tests for issues 2239 and 2732
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynzech committed Sep 3, 2024
1 parent 2960f80 commit 2db3d3b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/expected/issue-2239/issue_2239.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test_trivial_bounds.unreachable.1\
- Status: FAILURE\
- Description: "unreachable code"

VERIFICATION:- FAILED
12 changes: 12 additions & 0 deletions tests/expected/issue-2239/issue_2239.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#![feature(trivial_bounds)]
#![allow(unused, trivial_bounds)]

#[kani::proof]
fn test_trivial_bounds()
where
i32: Iterator,
{
for _ in 2i32 {}
}

fn main() {}
5 changes: 5 additions & 0 deletions tests/expected/issue-2732/issue_2732.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test.assertion\
- Status: FAILURE\
- Description: "index out of bounds: the length is less than or equal to the given index"

VERIFICATION:- FAILED
11 changes: 11 additions & 0 deletions tests/expected/issue-2732/issue_2732.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const C: [u32; 5] = [0; 5];

#[allow(unconditional_panic)]
fn test() -> u32 {
C[10]
}

#[kani::proof]
fn main() {
test();
}

0 comments on commit 2db3d3b

Please sign in to comment.