File tree Expand file tree Collapse file tree 6 files changed +83
-0
lines changed
regression/jbmc-strings/max-length-generic-array Expand file tree Collapse file tree 6 files changed +83
-0
lines changed Original file line number Diff line number Diff line change 1+ public class IntegerTests {
2+
3+ public static Boolean testMyGenSet (Integer key ) {
4+ if (key == null ) return null ;
5+ MyGenSet <Integer > ms = new MyGenSet <>();
6+ ms .array [0 ] = 101 ;
7+ if (ms .contains (key )) return true ;
8+ return false ;
9+ }
10+
11+ public static Boolean testMySet (Integer key ) {
12+ if (key == null ) return null ;
13+ MySet ms = new MySet ();
14+ ms .array [0 ] = 101 ;
15+ if (ms .contains (key )) return true ;
16+ return false ;
17+ }
18+
19+ }
20+
21+ class MyGenSet <E > {
22+ E [] array ;
23+ @ SuppressWarnings ("unchecked" )
24+ MyGenSet () {
25+ array = (E []) new Object [1 ];
26+ }
27+ boolean contains (E o ) {
28+ if (o .equals (array [0 ]))
29+ return true ;
30+ return false ;
31+ }
32+ }
33+
34+ class MySet {
35+ Integer [] array ;
36+ MySet () {
37+ array = new Integer [1 ];
38+ }
39+ boolean contains (Integer o ) {
40+ if (o .equals (array [0 ]))
41+ return true ;
42+ return false ;
43+ }
44+ }
Original file line number Diff line number Diff line change 1+ CORE
2+ IntegerTests.class
3+ -refine-strings --string-max-length 100 IntegerTests.class --function IntegerTests.testMySet --cover location
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ coverage.* line 12 function java::IntegerTests.testMySet.* bytecode-index 1 .* SATISFIED
7+ coverage.* line 12 function java::IntegerTests.testMySet.* bytecode-index 3 .* SATISFIED
8+ coverage.* line 13 function java::IntegerTests.testMySet.* bytecode-index 4 .* SATISFIED
9+ coverage.* line 13 function java::IntegerTests.testMySet.* bytecode-index 6 .* SATISFIED
10+ coverage.* line 13 function java::IntegerTests.testMySet.* bytecode-index 7 .* SATISFIED
11+ coverage.* line 14 function java::IntegerTests.testMySet.* bytecode-index 12 .* SATISFIED
12+ coverage.* line 14 function java::IntegerTests.testMySet.* bytecode-index 13 .* SATISFIED
13+ coverage.* line 15 function java::IntegerTests.testMySet.* bytecode-index 16 .* SATISFIED
14+ coverage.* line 15 function java::IntegerTests.testMySet.* bytecode-index 17 .* SATISFIED
15+ coverage.* line 16 function java::IntegerTests.testMySet.* bytecode-index 21 .* SATISFIED
16+ coverage.* line 15 function java::IntegerTests.testMySet.* bytecode-index 19 .* SATISFIED
17+ coverage.* line 15 function java::IntegerTests.testMySet.* bytecode-index 20 .* SATISFIED
18+ coverage.* line 16 function java::IntegerTests.testMySet.* bytecode-index 22 .* SATISFIED
19+ coverage.* line 16 function java::IntegerTests.testMySet.* bytecode-index 23 .* SATISFIED
Original file line number Diff line number Diff line change 1+ CORE
2+ IntegerTests.class
3+ -refine-strings --string-max-length 100 IntegerTests.class --function IntegerTests.testMyGenSet --cover location
4+ ^EXIT=0$
5+ ^SIGNAL=0$
6+ coverage.* line 4 function java::IntegerTests.testMyGenSet.* bytecode-index 1 .* SATISFIED
7+ coverage.* line 4 function java::IntegerTests.testMyGenSet.* bytecode-index 3 .* SATISFIED
8+ coverage.* line 5 function java::IntegerTests.testMyGenSet.* bytecode-index 4 .* SATISFIED
9+ coverage.* line 5 function java::IntegerTests.testMyGenSet.* bytecode-index 6 .* SATISFIED
10+ coverage.* line 5 function java::IntegerTests.testMyGenSet.* bytecode-index 7 .* SATISFIED
11+ coverage.* line 6 function java::IntegerTests.testMyGenSet.* bytecode-index 10 .* SATISFIED
12+ coverage.* line 6 function java::IntegerTests.testMyGenSet.* bytecode-index 13 .* SATISFIED
13+ coverage.* line 6 function java::IntegerTests.testMyGenSet.* bytecode-index 14 .* SATISFIED
14+ coverage.* line 7 function java::IntegerTests.testMyGenSet.* bytecode-index 17 .* SATISFIED
15+ coverage.* line 7 function java::IntegerTests.testMyGenSet.* bytecode-index 18 .* SATISFIED
16+ coverage.* line 8 function java::IntegerTests.testMyGenSet.* bytecode-index 22 .* SATISFIED
17+ coverage.* line 7 function java::IntegerTests.testMyGenSet.* bytecode-index 20 .* SATISFIED
18+ coverage.* line 7 function java::IntegerTests.testMyGenSet.* bytecode-index 21 .* SATISFIED
19+ coverage.* line 8 function java::IntegerTests.testMyGenSet.* bytecode-index 23 .* SATISFIED
20+ coverage.* line 8 function java::IntegerTests.testMyGenSet.* bytecode-index 24 .* SATISFIED
You can’t perform that action at this time.
0 commit comments