File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
regression/cbmc/Array_operations1 Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ void test_unequal()
1919
2020 __CPROVER_assert (
2121 !__CPROVER_array_equal (a1 , a2 ), "different sizes arrays are unequal" );
22+ __CPROVER_assert (__CPROVER_array_equal (a1 , a2 ), "expected to fail" );
2223
2324 float a3 [10 ];
2425 void * lost_type1 = a1 ;
@@ -27,6 +28,15 @@ void test_unequal()
2728 __CPROVER_assert (
2829 !__CPROVER_array_equal (lost_type1 , lost_type3 ),
2930 "different typed arrays are unequal" );
31+ __CPROVER_assert (
32+ __CPROVER_array_equal (lost_type1 , lost_type3 ), "expected to fail" );
33+
34+ int a4 [10 ];
35+ int a5 [10 ];
36+
37+ // Here the arrays both can be equal, and be not equal, so both asserts should fail
38+ __CPROVER_assert (!__CPROVER_array_equal (a4 , a5 ), "expected to fail" );
39+ __CPROVER_assert (__CPROVER_array_equal (a4 , a5 ), "expected to fail" );
3040}
3141
3242void test_copy ()
Original file line number Diff line number Diff line change 55^SIGNAL=0$
66^\[test_copy\.assertion\.4\] .* expected to fail: FAILURE$
77^\[test_unequal\.assertion\.1\] .* different sizes arrays are unequal: SUCCESS
8- ^\[test_unequal\.assertion\.2\] .* different typed arrays are unequal: SUCCESS
9- ^\*\* 1 of 10 failed
8+ ^\[test_unequal\.assertion\.2\] .* expected to fail: FAILURE
9+ ^\[test_unequal\.assertion\.3\] .* different typed arrays are unequal: SUCCESS
10+ ^\[test_unequal\.assertion\.4\] .* expected to fail: FAILURE
11+ ^\[test_unequal\.assertion\.5\] .* expected to fail: FAILURE
12+ ^\[test_unequal\.assertion\.6\] .* expected to fail: FAILURE
13+ ^\*\* 5 of 14 failed
1014^VERIFICATION FAILED$
1115--
1216^warning: ignoring
You can’t perform that action at this time.
0 commit comments