summaryrefslogtreecommitdiffstats
path: root/test/org/jetbrains
diff options
context:
space:
mode:
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-09-12 17:26:03 +0400
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-09-12 17:30:26 +0400
commite90f1de039b9305eed038f58db773ac2b8be36ed (patch)
treec9d4b09f7f8b4f545b95f35278ead7c3c76d2569 /test/org/jetbrains
parente2f7d09f3773af1ecf2b0e6b8e44a86a43906425 (diff)
downloadfernflower-e90f1de039b9305eed038f58db773ac2b8be36ed.tar
fernflower-e90f1de039b9305eed038f58db773ac2b8be36ed.tar.gz
fernflower-e90f1de039b9305eed038f58db773ac2b8be36ed.tar.lz
fernflower-e90f1de039b9305eed038f58db773ac2b8be36ed.tar.xz
fernflower-e90f1de039b9305eed038f58db773ac2b8be36ed.zip
IDEA-129221 (tolerate invalid signature attributes)
Diffstat (limited to 'test/org/jetbrains')
-rw-r--r--test/org/jetbrains/java/decompiler/SingleClassesTest.java42
1 files changed, 22 insertions, 20 deletions
diff --git a/test/org/jetbrains/java/decompiler/SingleClassesTest.java b/test/org/jetbrains/java/decompiler/SingleClassesTest.java
index 6261591..70aa605 100644
--- a/test/org/jetbrains/java/decompiler/SingleClassesTest.java
+++ b/test/org/jetbrains/java/decompiler/SingleClassesTest.java
@@ -43,30 +43,32 @@ public class SingleClassesTest {
fixture = null;
}
- @Test public void testClassFields() { doTest("TestClassFields"); }
- @Test public void testClassLambda() { doTest("TestClassLambda"); }
- @Test public void testClassLoop() { doTest("TestClassLoop"); }
- @Test public void testClassSwitch() { doTest("TestClassSwitch"); }
- @Test public void testClassTypes() { doTest("TestClassTypes"); }
- @Test public void testClassVar() { doTest("TestClassVar"); }
- @Test public void testClassNestedInitializer() { doTest("TestClassNestedInitializer"); }
- @Test public void testClassCast() { doTest("TestClassCast"); }
- @Test public void testDeprecations() { doTest("TestDeprecations"); }
- @Test public void testExtendsList() { doTest("TestExtendsList"); }
- @Test public void testMethodParameters() { doTest("TestMethodParameters"); }
- @Test public void testCodeConstructs() { doTest("TestCodeConstructs"); }
- @Test public void testConstants() { doTest("TestConstants"); }
- @Test public void testEnum() { doTest("TestEnum"); }
- @Test public void testDebugSymbols() { doTest("TestDebugSymbols"); }
-
- private void doTest(final String testName) {
+ @Test public void testClassFields() { doTest("pkg/TestClassFields"); }
+ @Test public void testClassLambda() { doTest("pkg/TestClassLambda"); }
+ @Test public void testClassLoop() { doTest("pkg/TestClassLoop"); }
+ @Test public void testClassSwitch() { doTest("pkg/TestClassSwitch"); }
+ @Test public void testClassTypes() { doTest("pkg/TestClassTypes"); }
+ @Test public void testClassVar() { doTest("pkg/TestClassVar"); }
+ @Test public void testClassNestedInitializer() { doTest("pkg/TestClassNestedInitializer"); }
+ @Test public void testClassCast() { doTest("pkg/TestClassCast"); }
+ @Test public void testDeprecations() { doTest("pkg/TestDeprecations"); }
+ @Test public void testExtendsList() { doTest("pkg/TestExtendsList"); }
+ @Test public void testMethodParameters() { doTest("pkg/TestMethodParameters"); }
+ @Test public void testCodeConstructs() { doTest("pkg/TestCodeConstructs"); }
+ @Test public void testConstants() { doTest("pkg/TestConstants"); }
+ @Test public void testEnum() { doTest("pkg/TestEnum"); }
+ @Test public void testDebugSymbols() { doTest("pkg/TestDebugSymbols"); }
+ @Test public void testInvalidMethodSignature() { doTest("InvalidMethodSignature"); }
+
+ private void doTest(String testFile) {
try {
- File classFile = new File(fixture.getTestDataDir(), "/classes/pkg/" + testName + ".class");
+ File classFile = new File(fixture.getTestDataDir(), "/classes/" + testFile + ".class");
assertTrue(classFile.isFile());
+ String testName = classFile.getName().replace(".class", "");
ConsoleDecompiler decompiler = fixture.getDecompiler();
- for (File inner : collectClasses(classFile)) {
- decompiler.addSpace(inner, true);
+ for (File file : collectClasses(classFile)) {
+ decompiler.addSpace(file, true);
}
decompiler.decompileContext();