Skip to content

Commit 41b4755

Browse files
committed
Update tests
1 parent 39832fa commit 41b4755

File tree

4 files changed

+25
-57
lines changed

4 files changed

+25
-57
lines changed
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright Kani Contributors
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33

4-
//! FIXME: <https://github.com/model-checking/kani/issues/4019>
5-
64
extern crate kani;
75
use kani::kani_forall;
86

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33
// kani-flags: -Zfunction-contracts
44

5-
//! FIXME: <https://github.com/model-checking/kani/issues/4019>
6-
75
#![feature(proc_macro_hygiene)]
86
#![feature(stmt_expr_attributes)]
97
extern crate kani;

tests/kani/Quantifiers/no_array.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,34 @@ fn forall_assume_harness() {
1818
kani::assert(j > 4, "");
1919
}
2020

21+
fn comp(x: usize, y: usize) -> bool {
22+
x > y
23+
}
24+
25+
#[kani::proof]
26+
fn forall_function_harness() {
27+
let j = kani::any();
28+
kani::assume(j > 5);
29+
kani::assert(kani::forall!(|i in (2,5)| comp(j, i) ), "");
30+
}
31+
2132
#[kani::proof]
2233
fn exists_assert_harness() {
2334
let j = kani::any();
2435
kani::assume(j > 2);
2536
kani::assert(kani::exists!(|i in (2,5)| i < j ), "");
2637
}
38+
39+
#[kani::proof]
40+
fn exists_assume_harness() {
41+
let j = kani::any();
42+
kani::assume(kani::exists!(|i in (2,4)| i == j));
43+
kani::assert(j == 3 || j == 2, "");
44+
}
45+
46+
#[kani::proof]
47+
fn exists_function_harness() {
48+
let j = kani::any();
49+
kani::assume(j > 2);
50+
kani::assert(kani::exists!(|i in (2,5)| comp(j, i) ), "");
51+
}

tests/kani/Quantifiers/no_array_fixme.rs

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)