forked from model-checking/kani
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
2b78109
commit 6d46351
Showing
3 changed files
with
56 additions
and
33 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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
fn test::is_zero(@1: i32) -> bool\ | ||
{\ | ||
let @0: bool; // return\ | ||
let @1: i32; // arg #1\ | ||
|
||
@0 := copy (@1) == const (0 : i32)\ | ||
return\ | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright Kani Contributors | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT | ||
// kani-flags: -Zaeneas | ||
|
||
//! This test checks that Kani's LLBC backend handles basic expressions, in this | ||
//! case an equality between a variable and a constant | ||
|
||
fn is_zero(i: i32) -> bool { | ||
i == 0 | ||
} | ||
|
||
#[kani::proof] | ||
fn main() { | ||
let _ = is_zero(0); | ||
} |