-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
26 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
coverage/reachable/assert-false/main.rs, 5, FULL | ||
coverage/reachable/assert-false/main.rs, 6, FULL | ||
coverage/reachable/assert-false/main.rs, 10, FULL | ||
coverage/reachable/assert-false/main.rs, 7, FULL | ||
coverage/reachable/assert-false/main.rs, 11, FULL | ||
coverage/reachable/assert-false/main.rs, 14, FULL | ||
coverage/reachable/assert-false/main.rs, 12, FULL | ||
coverage/reachable/assert-false/main.rs, 15, FULL | ||
coverage/reachable/assert-false/main.rs, 16, PARTIAL | ||
coverage/reachable/assert-false/main.rs, 16, FULL | ||
coverage/reachable/assert-false/main.rs, 17, PARTIAL | ||
coverage/reachable/assert-false/main.rs, 19, FULL | ||
coverage/reachable/assert-false/main.rs, 20, PARTIAL | ||
coverage/reachable/assert-false/main.rs, 22, FULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
coverage/unreachable/compare/main.rs, 5, PARTIAL | ||
coverage/unreachable/compare/main.rs, 6, FULL | ||
coverage/unreachable/compare/main.rs, 10, FULL | ||
coverage/unreachable/compare/main.rs, 6, PARTIAL | ||
coverage/unreachable/compare/main.rs, 7, FULL | ||
coverage/unreachable/compare/main.rs, 11, FULL | ||
coverage/unreachable/compare/main.rs, 12, FULL | ||
coverage/unreachable/compare/main.rs, 13, FULL | ||
coverage/unreachable/compare/main.rs, 15, FULL | ||
coverage/unreachable/compare/main.rs, 14, FULL | ||
coverage/unreachable/compare/main.rs, 16, FULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
// Copyright Kani Contributors | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
||
// Test that checks for UNREACHABLE panics. The panic is reported as NONE for the assumption that the divisor is not zero. | ||
fn divide(a: i32, b: i32) -> i32 { | ||
if b != 0 { | ||
return a / b; | ||
} else { | ||
// This part is unreachable since b != 0 was already checked. | ||
panic!("Division by zero"); | ||
} | ||
} | ||
|
||
#[kani::proof] | ||
fn main() { | ||
let result = divide(10, 2); | ||
let y: i32 = kani::any(); | ||
kani::assume(y != 0); | ||
let result = divide(10, y); | ||
assert_eq!(result, 5); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
coverage/unreachable/if-statement/main.rs, 5, FULL | ||
coverage/unreachable/if-statement/main.rs, 6, PARTIAL | ||
coverage/unreachable/if-statement/main.rs, 7, NONE | ||
coverage/unreachable/if-statement/main.rs, 7, PARTIAL | ||
coverage/unreachable/if-statement/main.rs, 8, NONE | ||
coverage/unreachable/if-statement/main.rs, 10, NONE | ||
coverage/unreachable/if-statement/main.rs, 12, FULL | ||
coverage/unreachable/if-statement/main.rs, 16, FULL | ||
coverage/unreachable/if-statement/main.rs, 9, NONE | ||
coverage/unreachable/if-statement/main.rs, 11, NONE | ||
coverage/unreachable/if-statement/main.rs, 13, FULL | ||
coverage/unreachable/if-statement/main.rs, 17, FULL | ||
coverage/unreachable/if-statement/main.rs, 18, FULL | ||
coverage/unreachable/if-statement/main.rs, 19, FULL | ||
coverage/unreachable/if-statement/main.rs, 20, FULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
coverage/unreachable/variant/main.rs, 12, PARTIAL | ||
coverage/unreachable/variant/main.rs, 12, FULL | ||
coverage/unreachable/variant/main.rs, 13, NONE | ||
coverage/unreachable/variant/main.rs, 14, NONE | ||
coverage/unreachable/variant/main.rs, 15, FULL | ||
coverage/unreachable/variant/main.rs, 16, NONE | ||
coverage/unreachable/variant/main.rs, 19, FULL | ||
coverage/unreachable/variant/main.rs, 23, FULL | ||
coverage/unreachable/variant/main.rs, 18, NONE | ||
coverage/unreachable/variant/main.rs, 20, FULL | ||
coverage/unreachable/variant/main.rs, 24, FULL | ||
coverage/unreachable/variant/main.rs, 25, FULL | ||
coverage/unreachable/variant/main.rs, 26, FULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters