File tree Expand file tree Collapse file tree 6 files changed +69
-0
lines changed
jbmc/regression/jbmc/classpath-jar-load-whole-jar
src/main/java/org/cprover/first Expand file tree Collapse file tree 6 files changed +69
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5
+ <modelVersion >4.0.0</modelVersion >
6
+ <groupId >org.cprover.regression</groupId >
7
+ <artifactId >regression</artifactId >
8
+ <version >1.0-SNAPSHOT</version >
9
+
10
+ <build >
11
+ <finalName >jar-file</finalName >
12
+ <plugins >
13
+ <plugin >
14
+ <groupId >org.apache.maven.plugins</groupId >
15
+ <artifactId >maven-jar-plugin</artifactId >
16
+ <configuration >
17
+ <archive >
18
+ <manifest >
19
+ <mainClass >org.cprover.regression.RelevantClass</mainClass >
20
+ </manifest >
21
+ </archive >
22
+ </configuration >
23
+ </plugin >
24
+ </plugins >
25
+ </build >
26
+
27
+ <properties >
28
+ <maven .compiler.source>1.8</maven .compiler.source>
29
+ <maven .compiler.target>1.8</maven .compiler.target>
30
+ </properties >
31
+
32
+ </project >
Original file line number Diff line number Diff line change
1
+ package org .cprover .first ;
2
+
3
+ public class IrrelevantClass {
4
+
5
+ public static void notImportant () { assert true ; }
6
+ }
Original file line number Diff line number Diff line change
1
+ package org .cprover .first ;
2
+
3
+ public class RelatedClass { public int i ; }
Original file line number Diff line number Diff line change
1
+ package org .cprover .first ;
2
+
3
+ import org .cprover .second .RelatedClassOtherPkg ;
4
+
5
+ public class RelevantClass {
6
+
7
+ public static void entry (RelatedClass rc , RelatedClassOtherPkg rcop ) {
8
+ assert false ;
9
+ }
10
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ target/jar-file.jar
3
+ --verbosity 10 --ignore-manifest-main-class
4
+ ^EXIT=6$
5
+ ^SIGNAL=0$
6
+ Getting class 'org\.cprover\.first\.RelevantClass' from JAR target\/jar-file.jar
7
+ Getting class 'org\.cprover\.first\.RelatedClass' from JAR target\/jar-file.jar
8
+ Getting class 'org\.cprover\.first\.IrrelevantClass' from JAR target\/jar-file.jar
9
+ Getting class 'org\.cprover\.second\.RelatedClassOtherPkg' from JAR target\/jar-file.jar
10
+ Getting class 'org\.cprover\.second\.IrrelevantClassOtherPkg' from JAR target\/jar-file.jar
11
+ no entry point
12
+ --
13
+ --
14
+ This test checks that when JBMC is given a JAR file whose manifest specifies a
15
+ main class, we can ignore this main class and instead load all classes of the
16
+ JAR file with the option --ignore-manifest-main-class.
17
+ Without this option, IrrelevantClass would not be loaded as it is not reachable
18
+ from RelevantClass (the main class).
You can’t perform that action at this time.
0 commit comments