File tree 6 files changed +73
-0
lines changed
jbmc/regression/jbmc/classpath-jar-load-whole-jar
src/main/java/org/cprover/regression 6 files changed +73
-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 .regression ;
2
+
3
+ public class IrrelevantClass {
4
+
5
+ public static void notImportant () {
6
+ assert true ;
7
+ }
8
+
9
+ }
Original file line number Diff line number Diff line change
1
+ package org .cprover .regression ;
2
+
3
+ public class RelatedClass {
4
+
5
+ public int i ;
6
+
7
+ }
Original file line number Diff line number Diff line change
1
+ package org .cprover .regression ;
2
+
3
+ public class RelevantClass {
4
+
5
+ public static void entry (RelatedClass rc ) {
6
+ assert false ;
7
+ }
8
+
9
+ }
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\.regression\.RelevantClass' from JAR target\/jar-file.jar
7
+ Getting class 'org\.cprover\.regression\.RelatedClass' from JAR target\/jar-file.jar
8
+ Getting class 'org\.cprover\.regression\.IrrelevantClass' from JAR target\/jar-file.jar
9
+ no entry point
10
+ --
11
+ --
12
+ This test checks that when JBMC is given a JAR file whose manifest specifies a
13
+ main class, we can ignore this main class and instead load all classes of the
14
+ JAR file with the option --ignore-manifest-main-class.
15
+ Without this option, IrrelevantClass would not be loaded as it is not reachable
16
+ from RelevantClass (the main class).
You can’t perform that action at this time.
0 commit comments