File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed
tests/cargo-kani/concrete-playback-in-verification-mode Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ pub mod vec;
21
21
pub use arbitrary:: Arbitrary ;
22
22
#[ cfg( feature = "concrete_playback" ) ]
23
23
pub use concrete_playback:: concrete_playback_run;
24
+ #[ cfg( not( feature = "concrete_playback" ) ) ]
25
+ /// NOP `concrete_playback` for type checking during verification mode.
26
+ pub fn concrete_playback_run < F : Fn ( ) > ( _: Vec < Vec < u8 > > , _: F ) {
27
+ unreachable ! ( "Concrete playback does not work during verification" )
28
+ }
29
+
24
30
pub use futures:: block_on;
25
31
26
32
/// Creates an assumption that will be valid after this statement run. Note that the assumption
Original file line number Diff line number Diff line change
1
+ # Copyright Kani Contributors
2
+ # SPDX-License-Identifier: Apache-2.0 OR MIT
3
+ [package ]
4
+ name = " playback-test"
5
+ version = " 0.1.0"
6
+ edition = " 2018"
7
+
8
+ [dependencies ]
9
+
10
+ [workspace ]
Original file line number Diff line number Diff line change
1
+ // Copyright Kani Contributors
2
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
3
+ #[ kani:: proof]
4
+ fn main ( ) {
5
+ assert ! ( 1 == 1 ) ;
6
+ }
7
+
8
+ #[ test]
9
+ /// Purpose of this is to check if Kani can comple this code in
10
+ /// verification mode when `kani::concrete_playback_run` is in the
11
+ /// code,
12
+ fn _playback_type_checks ( ) {
13
+ kani:: concrete_playback_run ( vec ! [ ] , test_sum) ;
14
+ }
You can’t perform that action at this time.
0 commit comments