-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from tahiat/issue_38
Crash fix for UnionType parameter in Issue #38
- Loading branch information
Showing
20 changed files
with
350 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/test/java/org/checkerframework/specimin/CustomExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.checkerframework.specimin; | ||
|
||
import java.io.IOException; | ||
import org.junit.Test; | ||
|
||
public class CustomExceptionTest { | ||
@Test | ||
public void runTest() throws IOException { | ||
SpeciminTestExecutor.runTestWithoutJarPaths( | ||
"customexception", | ||
new String[] {"com/example/Simple.java"}, | ||
new String[] {"com.example.Simple#test()"}); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/test/java/org/checkerframework/specimin/Issue38Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.checkerframework.specimin; | ||
|
||
import java.io.IOException; | ||
import org.junit.Test; | ||
|
||
/** This test checks if Specimin will work for Union types */ | ||
public class Issue38Test { | ||
@Test | ||
public void runTest() throws IOException { | ||
SpeciminTestExecutor.runTestWithoutJarPaths( | ||
"issue38", | ||
new String[] {"com/example/Issue38.java"}, | ||
new String[] {"com.example.Issue38#test()"}); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/test/java/org/checkerframework/specimin/NestedCatchClauseTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.checkerframework.specimin; | ||
|
||
import java.io.IOException; | ||
import org.junit.Test; | ||
|
||
public class NestedCatchClauseTest { | ||
@Test | ||
public void runTest() throws IOException { | ||
SpeciminTestExecutor.runTestWithoutJarPaths( | ||
"nestedcatchclause", | ||
new String[] {"com/example/Simple.java"}, | ||
new String[] {"com.example.Simple#test()"}); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/test/java/org/checkerframework/specimin/UnsolvableExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.checkerframework.specimin; | ||
|
||
import java.io.IOException; | ||
import org.junit.Test; | ||
|
||
public class UnsolvableExceptionTest { | ||
@Test | ||
public void runTest() throws IOException { | ||
SpeciminTestExecutor.runTestWithoutJarPaths( | ||
"unsolvedexception", | ||
new String[] {"com/example/Simple.java"}, | ||
new String[] {"com.example.Simple#test()"}); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/test/resources/customexception/expected/com/example/CustomException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.example; | ||
|
||
public class CustomException extends Exception { | ||
|
||
public CustomException(String msg) { | ||
throw new Error(); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/test/resources/customexception/expected/com/example/Simple.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.example; | ||
|
||
public class Simple { | ||
|
||
public void test() { | ||
try { | ||
throw new CustomException("dummy"); | ||
} catch (CustomException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/test/resources/customexception/input/com/example/CustomException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.example; | ||
public class CustomException extends Exception { | ||
public CustomException (String msg) { | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/test/resources/customexception/input/com/example/Simple.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.example; | ||
|
||
import org.checkerframework.specimin.CustomExceptionTest; | ||
|
||
public class Simple { | ||
|
||
public void test() { | ||
try { | ||
throw new CustomException("dummy"); | ||
} catch (CustomException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
Oops, something went wrong.