Skip to content

Commit f48a123

Browse files
committed
Merged with mster
2 parents 22643f9 + 8f871c3 commit f48a123

File tree

4 files changed

+15
-27
lines changed

4 files changed

+15
-27
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ You can find out more about LiquidJava in the following resources:
2828

2929
## Setup the project
3030
1. Clone the repository;
31+
<<<<<<< HEAD
3132
2. Open Eclipse and do `Ìmport...\ Existing Maven Project` selecting the current folder and waiting for the build process to finish (bottom right update bar)
3233
3. Select the current folder, right click it and select `Run as...\Maven install...`
34+
=======
35+
2. Open Eclipse and do `Ìmport...\ Existing Maven Project` selecting the project folder `liquidjava` and waiting for the build process to finish (bottom right update bar)
36+
3. Select the `liquidjava-umbrella` folder, right click it and select `Run as...\Maven install...`
37+
>>>>>>> 8f871c3c15eaf408a01354a867e71466d45115be
3338
4. If inside the `liquidjava-verifier` build path there is not a `target/generated-sources/antr4`: Select `liquidjava-verifier`, on right-click, go to `Build Path\Link Source...` and browse for `liquidjava-verifier\target\generated-sources\antlr4` and select `Finish`
3439

3540
## Run verification

liquidjava-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<dependency>
5151
<groupId>junit</groupId>
5252
<artifactId>junit</artifactId>
53-
<version>4.11</version>
53+
<version>4.13.1</version>
5454
<scope>test</scope>
5555
</dependency>
5656
</dependencies>

liquidjava-verifier/src/main/java/liquidjava/api/CommandLineLauncher.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ public static void main(String[] args) {
2626
}
2727
}
2828

29-
public static void launchTest(String file) {
29+
public static ErrorEmitter launchTest(String file) {
3030
ErrorEmitter ee = launch(file);
3131
if (ee.foundError()) {
3232
System.out.println(ee.getFullMessage());
33-
System.exit(ee.getErrorStatus());
33+
// System.exit(ee.getErrorStatus());
3434
} else {
3535
System.out.println("Analysis complete!");
3636
}
37+
return ee;
3738
}
3839

3940
public static ErrorEmitter launch(String file) {

liquidjava-verifier/src/main/java/liquidjava/api/tests/TestAbstract.java

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,20 @@
44

55
import java.security.Permission;
66
import liquidjava.api.CommandLineLauncher;
7+
import liquidjava.errors.ErrorEmitter;
78

89
public abstract class TestAbstract {
910
String testPath = "../liquidjava-example/src/test/java/liquidjava/";
1011

1112
protected void testCorrect(String filename) {
12-
try {
13-
CommandLineLauncher.launchTest(filename);
14-
} catch (SecurityException e) {
13+
ErrorEmitter errorEmitter = CommandLineLauncher.launchTest(filename);
14+
if (errorEmitter.foundError())
1515
fail();
16-
}
1716
}
1817

1918
protected void testWrong(String filename) {
20-
try {
21-
CommandLineLauncher.launchTest(filename);
22-
} catch (SecurityException e) {
23-
return;
24-
}
25-
fail();
26-
}
27-
28-
class MySecurityManager extends SecurityManager {
29-
// Handles exit(1) when the refinements are not respected
30-
@Override
31-
public void checkExit(int status) {
32-
if (status == 1 || status == 2)
33-
throw new SecurityException("subtyping");
34-
}
35-
36-
@Override
37-
public void checkPermission(Permission perm) {
38-
// Allow other activities by default
39-
}
19+
ErrorEmitter errorEmitter = CommandLineLauncher.launchTest(filename);
20+
if (!errorEmitter.foundError())
21+
fail();
4022
}
4123
}

0 commit comments

Comments
 (0)