forked from viperproject/prusti-dev
-
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.
Enable
encode_unsigned_num_constraint
by default (viperproject#1281)
* Addresses viperproject#1215 * Skip memchr crate * Add more tests * Removed unneeded environment variable * Skip failing crates * Fix typo * Skip failing crates * Temporarily disable fail_fast * Switch from native-tls to rustls * Re-enable skipped crates * Skip failing crates * Skip failing crates * disable failing crate * Re-enable fail_fast * Print errors with Display * Disable encode_unsigned_num_constraints * Fix typo in environment variable * Remove unnecessairy compile flags
- Loading branch information
Showing
5 changed files
with
42 additions
and
5 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,9 @@ | ||
use prusti_contracts::*; | ||
|
||
fn main() {} | ||
|
||
// #[requires(0 <= i)] // This should not be needed, if encode_unsigned_num_constraint=true is the default | ||
#[requires(i < s.len())] | ||
fn _test(s: &[i64], i: usize) -> i64 { | ||
s[i] | ||
} |
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,28 @@ | ||
#![allow(unused_comparisons)] | ||
use prusti_contracts::*; | ||
|
||
fn main() {} | ||
|
||
fn _test_u8(x: u8) { | ||
prusti_assert!(x >= 0); | ||
} | ||
|
||
fn _test_u16(x: u16) { | ||
prusti_assert!(x >= 0); | ||
} | ||
|
||
fn _test_u32(x: u32) { | ||
prusti_assert!(x >= 0); | ||
} | ||
|
||
fn _test_u64(x: u64) { | ||
prusti_assert!(x >= 0); | ||
} | ||
|
||
fn _test_u128(x: u128) { | ||
prusti_assert!(x >= 0); | ||
} | ||
|
||
fn _test_usize(x: usize) { | ||
prusti_assert!(x >= 0); | ||
} |
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