-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR fixes a few flaky tests that started to fail in the ongoing toolchain update (#2551) - The object bits test itself doesn't create that many objects since an array is represented as the same allocated object. Use LinkedList instead. - Do not rely on property number. - Do not rely on the order that failed checks is printed.
- Loading branch information
Showing
3 changed files
with
9 additions
and
13 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
tests/cargo-kani/vecdeque-cve/reserve_available_capacity_is_no_op.expected
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,15 +1,11 @@ | ||
// Copyright Kani Contributors | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
||
// Checks for error message with an --object-bits value that is too small | ||
|
||
// kani-flags: --default-unwind 30 --enable-unstable --cbmc-args --object-bits 5 | ||
//! Checks for error message with an --object-bits value that is too small | ||
//! Use linked list to ensure that each member represents a new object. | ||
|
||
#[kani::proof] | ||
fn main() { | ||
let mut arr: [i32; 100] = kani::Arbitrary::any_array(); | ||
for i in 0..30 { | ||
arr[i] = kani::any(); | ||
} | ||
assert!(arr[0] > arr[0] - arr[99]); | ||
let arr: [i32; 18] = kani::Arbitrary::any_array(); | ||
std::hint::black_box(std::collections::LinkedList::from(arr)); | ||
} |
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,4 +1,4 @@ | ||
** 2 of 2 failed\ | ||
** 2 of 2 failed | ||
Failed Checks: panicked on the `if` branch! | ||
Failed Checks: panicked on the `else` branch! | ||
VERIFICATION:- SUCCESSFUL (encountered one or more panics as expected) |