File tree 28 files changed +197
-16
lines changed
28 files changed +197
-16
lines changed Original file line number Diff line number Diff line change
1
+ VERIFICATION:- FAILED
2
+
3
+ Executable trace
4
+ ```
5
+ #[test]
6
+ fn kani_exe_trace_harness
7
+ let det_vals: Vec<Vec<u8>> = vec![
8
+ // 101
9
+ vec![101],
10
+ // 102
11
+ vec![102]
12
+ ];
13
+ kani::exe_trace_run(det_vals, harness);
14
+ }
15
+ ```
Original file line number Diff line number Diff line change
1
+ // Copyright Kani Contributors
2
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
3
+
4
+ // kani-flags: --harness harness --enable-unstable --gen-exe-trace
5
+
6
+ #[ kani:: proof]
7
+ #[ kani:: unwind( 10 ) ]
8
+ pub fn harness ( ) {
9
+ let arr_1: [ u8 ; 2 ] = kani:: any ( ) ;
10
+ assert ! ( !( arr_1[ 0 ] == 101 && arr_1[ 1 ] == 102 ) ) ;
11
+ }
Original file line number Diff line number Diff line change
1
+ VERIFICATION:- FAILED
2
+
3
+ Executable trace
4
+ ```
5
+ #[test]
6
+ fn kani_exe_trace_harness
7
+ let det_vals: Vec<Vec<u8>> = vec![
8
+ // 0
9
+ vec![0
10
+ ];
11
+ kani::exe_trace_run(det_vals, harness);
12
+ }
13
+ ```
Original file line number Diff line number Diff line change
1
+ // Copyright Kani Contributors
2
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
3
+
4
+ // kani-flags: --harness harness --enable-unstable --gen-exe-trace
5
+
6
+ /// Note: We can't test a false value yet because any::<bool>() could be any non-zero number.
7
+ #[ kani:: proof]
8
+ pub fn harness ( ) {
9
+ let bool_1: bool = kani:: any ( ) ;
10
+ assert ! ( bool_1 != true ) ;
11
+ }
Original file line number Diff line number Diff line change
1
+ VERIFICATION:- FAILED
2
+
3
+ Executable trace
4
+ ```
5
+ #[test]
6
+ fn kani_exe_trace_harness
7
+ let det_vals: Vec<Vec<u8>> = vec![
8
+ // 101
9
+ vec![101],
10
+ // 102
11
+ vec![102, 0]
12
+ ];
13
+ kani::exe_trace_run(det_vals, harness);
14
+ }
15
+ ```
Original file line number Diff line number Diff line change
1
+ // Copyright Kani Contributors
2
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
3
+
4
+ // kani-flags: --harness harness --enable-unstable --gen-exe-trace
5
+
6
+ struct MyStruct {
7
+ field1 : u8 ,
8
+ field2 : u16 ,
9
+ }
10
+
11
+ impl kani:: Arbitrary for MyStruct {
12
+ fn any ( ) -> Self {
13
+ MyStruct { field1 : kani:: any ( ) , field2 : kani:: any ( ) }
14
+ }
15
+ }
16
+
17
+ #[ kani:: proof]
18
+ pub fn harness ( ) {
19
+ let my_struct: MyStruct = kani:: any ( ) ;
20
+ assert ! ( !( my_struct. field1 == 101 && my_struct. field2 == 102 ) ) ;
21
+ }
Original file line number Diff line number Diff line change @@ -24,4 +24,4 @@ fn kani_exe_trace_harness
24
24
];
25
25
kani::exe_trace_run(det_vals, harness);
26
26
}
27
- ```
27
+ ```
Original file line number Diff line number Diff line change 3
3
4
4
// kani-flags: --harness harness --enable-unstable --gen-exe-trace
5
5
6
+ /// Note: Don't include NaN because there are multiple possible NaN values.
6
7
#[ kani:: proof]
7
8
pub fn harness ( ) {
8
9
let f32_1: f32 = kani:: any ( ) ;
@@ -23,5 +24,4 @@ pub fn harness() {
23
24
&& f32_7 == f32 :: MAX
24
25
&& f32_8 == f32 :: INFINITY )
25
26
) ;
26
- // Note: Don't include NaN because there are multiple possible NaN values.
27
27
}
Original file line number Diff line number Diff line change @@ -24,4 +24,4 @@ fn kani_exe_trace_harness
24
24
];
25
25
kani::exe_trace_run(det_vals, harness);
26
26
}
27
- ```
27
+ ```
Original file line number Diff line number Diff line change 3
3
4
4
// kani-flags: --harness harness --enable-unstable --gen-exe-trace
5
5
6
+ /// Note: Don't include NaN because there are multiple possible NaN values.
6
7
#[ kani:: proof]
7
8
pub fn harness ( ) {
8
9
let f64_1: f64 = kani:: any ( ) ;
@@ -23,5 +24,4 @@ pub fn harness() {
23
24
&& f64_7 == f64 :: MAX
24
25
&& f64_8 == f64 :: INFINITY )
25
26
) ;
26
- // Note: Don't include NaN because there are multiple possible NaN values.
27
27
}
Original file line number Diff line number Diff line change @@ -18,4 +18,4 @@ fn kani_exe_trace_harness
18
18
];
19
19
kani::exe_trace_run(det_vals, harness);
20
20
}
21
- ```
21
+ ```
Original file line number Diff line number Diff line change @@ -18,4 +18,4 @@ fn kani_exe_trace_harness
18
18
];
19
19
kani::exe_trace_run(det_vals, harness);
20
20
}
21
- ```
21
+ ```
Original file line number Diff line number Diff line change @@ -18,4 +18,4 @@ fn kani_exe_trace_harness
18
18
];
19
19
kani::exe_trace_run(det_vals, harness);
20
20
}
21
- ```
21
+ ```
Original file line number Diff line number Diff line change @@ -18,4 +18,4 @@ fn kani_exe_trace_harness
18
18
];
19
19
kani::exe_trace_run(det_vals, harness);
20
20
}
21
- ```
21
+ ```
Original file line number Diff line number Diff line change @@ -18,4 +18,4 @@ fn kani_exe_trace_harness
18
18
];
19
19
kani::exe_trace_run(det_vals, harness);
20
20
}
21
- ```
21
+ ```
Original file line number Diff line number Diff line change @@ -18,4 +18,4 @@ fn kani_exe_trace_harness
18
18
];
19
19
kani::exe_trace_run(det_vals, harness);
20
20
}
21
- ```
21
+ ```
Original file line number Diff line number Diff line change
1
+ VERIFICATION:- FAILED
2
+
3
+ Executable trace
4
+ ```
5
+ #[test]
6
+ fn kani_exe_trace_harness
7
+ let det_vals: Vec<Vec<u8>> = vec![
8
+ // 1
9
+ vec![1],
10
+ // 101
11
+ vec![101],
12
+ // 255
13
+ vec![255]
14
+ ];
15
+ kani::exe_trace_run(det_vals, harness);
16
+ }
17
+ ```
Original file line number Diff line number Diff line change
1
+ // Copyright Kani Contributors
2
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
3
+
4
+ // kani-flags: --harness harness --enable-unstable --gen-exe-trace
5
+
6
+ use std:: num:: NonZeroU8 ;
7
+
8
+ #[ kani:: proof]
9
+ pub fn harness ( ) {
10
+ let non_zero_u8_1: NonZeroU8 = kani:: any ( ) ;
11
+ let non_zero_u8_2: NonZeroU8 = kani:: any ( ) ;
12
+ let non_zero_u8_3: NonZeroU8 = kani:: any ( ) ;
13
+ unsafe {
14
+ assert ! (
15
+ !( non_zero_u8_1 == NonZeroU8 :: new_unchecked( 1 )
16
+ && non_zero_u8_2 == NonZeroU8 :: new_unchecked( 101 )
17
+ && non_zero_u8_3 == NonZeroU8 :: new_unchecked( 255 ) )
18
+ ) ;
19
+ }
20
+ }
Original file line number Diff line number Diff line change
1
+ VERIFICATION:- FAILED
2
+
3
+ Executable trace
4
+ ```
5
+ #[test]
6
+ fn kani_exe_trace_harness
7
+ let det_vals: Vec<Vec<u8>> = vec![
8
+ // 0
9
+ vec![0],
10
+ // 101
11
+ vec![101]
12
+ ];
13
+ kani::exe_trace_run(det_vals, harness);
14
+ }
15
+ ```
Original file line number Diff line number Diff line change
1
+ // Copyright Kani Contributors
2
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
3
+
4
+ // kani-flags: --harness harness --enable-unstable --gen-exe-trace
5
+
6
+ /// This should generate 2 bools.
7
+ /// The first should be 0 because the Option type is Some.
8
+ /// The second should be 101, the inner value of the Some.
9
+ /// Note: We can't test on a None type yet because the first any::<bool>() could be any non-zero number.
10
+ #[ kani:: proof]
11
+ pub fn harness ( ) {
12
+ let option_1: Option < u8 > = kani:: any ( ) ;
13
+ assert ! ( option_1 != Some ( 101 ) ) ;
14
+ }
Original file line number Diff line number Diff line change
1
+ VERIFICATION:- FAILED
2
+
3
+ Executable trace
4
+ ```
5
+ #[test]
6
+ fn kani_exe_trace_harness
7
+ let det_vals: Vec<Vec<u8>> = vec![
8
+ // 0
9
+ vec![0],
10
+ // 101
11
+ vec![101]
12
+ ];
13
+ kani::exe_trace_run(det_vals, harness);
14
+ }
15
+ ```
Original file line number Diff line number Diff line change
1
+ // Copyright Kani Contributors
2
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
3
+
4
+ // kani-flags: --harness harness --enable-unstable --gen-exe-trace
5
+
6
+ /// This should generate 2 bools.
7
+ /// The first should be 0 because the Result type is Ok.
8
+ /// The second should be 101, the inner value of the Ok.
9
+ /// Note: We can't test an Err type yet because the first any::<bool>() could be any non-zero number.
10
+ #[ kani:: proof]
11
+ pub fn harness ( ) {
12
+ let result_1: Result < u8 , u8 > = kani:: any ( ) ;
13
+ assert ! ( result_1 != Ok ( 101 ) ) ;
14
+ }
Original file line number Diff line number Diff line change @@ -14,4 +14,4 @@ fn kani_exe_trace_harness
14
14
];
15
15
kani::exe_trace_run(det_vals, harness);
16
16
}
17
- ```
17
+ ```
Original file line number Diff line number Diff line change @@ -14,4 +14,4 @@ fn kani_exe_trace_harness
14
14
];
15
15
kani::exe_trace_run(det_vals, harness);
16
16
}
17
- ```
17
+ ```
Original file line number Diff line number Diff line change @@ -14,4 +14,4 @@ fn kani_exe_trace_harness
14
14
];
15
15
kani::exe_trace_run(det_vals, harness);
16
16
}
17
- ```
17
+ ```
Original file line number Diff line number Diff line change @@ -14,4 +14,4 @@ fn kani_exe_trace_harness
14
14
];
15
15
kani::exe_trace_run(det_vals, harness);
16
16
}
17
- ```
17
+ ```
Original file line number Diff line number Diff line change @@ -14,4 +14,4 @@ fn kani_exe_trace_harness
14
14
];
15
15
kani::exe_trace_run(det_vals, harness);
16
16
}
17
- ```
17
+ ```
Original file line number Diff line number Diff line change @@ -14,4 +14,4 @@ fn kani_exe_trace_harness
14
14
];
15
15
kani::exe_trace_run(det_vals, harness);
16
16
}
17
- ```
17
+ ```
You can’t perform that action at this time.
0 commit comments