Skip to content

Commit 89605f9

Browse files
antlechnerowen-mc-diffblue
authored andcommitted
Add regression test for new option
1 parent da8d5b0 commit 89605f9

File tree

6 files changed

+73
-0
lines changed

6 files changed

+73
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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 numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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 numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package org.cprover.regression;
2+
3+
public class RelatedClass {
4+
5+
public int i;
6+
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package org.cprover.regression;
2+
3+
public class RelevantClass {
4+
5+
public static void entry(RelatedClass rc) {
6+
assert false;
7+
}
8+
9+
}
Binary file not shown.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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).

0 commit comments

Comments
 (0)