File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
jbmc/regression/jbmc/classIdentifier Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ public class Test {
2
+ public String check (int assertId ) {
3
+ Object o ;
4
+ o = "foo" ;
5
+ String classId = org .cprover .CProver .classIdentifier (o );
6
+ if (assertId == 1 ) {
7
+ assert org .cprover .CProverString .equals (classId , "java.lang.String" );
8
+ } else if (assertId == 2 ) {
9
+ assert org .cprover .CProverString .equals (classId , "java.lang.Integer" );
10
+ }
11
+ o = new Integer (42 );
12
+ classId = org .cprover .CProver .classIdentifier (o );
13
+ if (assertId == 3 ) {
14
+ assert org .cprover .CProverString .equals (classId , "java.lang.String" );
15
+ } else if (assertId == 4 ) {
16
+ assert org .cprover .CProverString .equals (classId , "java.lang.Integer" );
17
+ }
18
+ return classId ;
19
+ }
20
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ Test.class
3
+ --function Test.check --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar`
4
+ ^EXIT=10$
5
+ ^SIGNAL=0$
6
+ assertion at file Test.java line 7 .*: SUCCESS
7
+ assertion at file Test.java line 9 .*: FAILURE
8
+ assertion at file Test.java line 14 .*: FAILURE
9
+ assertion at file Test.java line 16 .*: SUCCESS
You can’t perform that action at this time.
0 commit comments