-
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 #42 from LoiNguyenCS/add-static-method
Add static method
- Loading branch information
Showing
14 changed files
with
213 additions
and
80 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
17 changes: 17 additions & 0 deletions
17
src/test/java/org/checkerframework/specimin/UnsolvedStaticMethod.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,17 @@ | ||
package org.checkerframework.specimin; | ||
|
||
import java.io.IOException; | ||
import org.junit.Test; | ||
|
||
/** | ||
* This test checks if Specimin will work for input files that contain unsolved static methods. | ||
*/ | ||
public class UnsolvedStaticMethod { | ||
@Test | ||
public void runTest() throws IOException { | ||
SpeciminTestExecutor.runTestWithoutJarPaths( | ||
"unsolvedstaticmethod", | ||
new String[] {"com/example/Simple.java"}, | ||
new String[] {"com.example.Simple#bar()"}); | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
...sources/unsolvedstaticmethod/expected/com/example/ComExampleMyClassProcessReturnType.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,4 @@ | ||
package com.example; | ||
|
||
public class ComExampleMyClassProcessReturnType { | ||
} |
8 changes: 8 additions & 0 deletions
8
src/test/resources/unsolvedstaticmethod/expected/com/example/MyClass.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 MyClass { | ||
|
||
public static ComExampleMyClassProcessReturnType process(int parameter0) { | ||
throw new Error(); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/test/resources/unsolvedstaticmethod/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,15 @@ | ||
package com.example; | ||
|
||
import com.example.MyClass; | ||
import unreal.pack.AClass; | ||
|
||
class Simple { | ||
|
||
void bar() { | ||
int x = 5; | ||
String y = "hello"; | ||
AClass z = new AClass(); | ||
MyClass.process(x); | ||
org.testing.ThisClass.process(y, z); | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
...urces/unsolvedstaticmethod/expected/org/testing/OrgTestingThisClassProcessReturnType.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,4 @@ | ||
package org.testing; | ||
|
||
public class OrgTestingThisClassProcessReturnType { | ||
} |
8 changes: 8 additions & 0 deletions
8
src/test/resources/unsolvedstaticmethod/expected/org/testing/ThisClass.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 org.testing; | ||
|
||
public class ThisClass { | ||
|
||
public static OrgTestingThisClassProcessReturnType process(java.lang.String parameter0, unreal.pack.AClass parameter1) { | ||
throw new Error(); | ||
} | ||
} |
Oops, something went wrong.