mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
java: more decompiler tests
This commit is contained in:
@@ -55,6 +55,7 @@ public class IdeaDecompilerTest extends LightCodeInsightFixtureTestCase {
|
||||
public void testExtendsList() { doTestDecompiler(); }
|
||||
public void testParameters() { doTestDecompiler(); }
|
||||
public void testConstants() { doTestDecompiler(); }
|
||||
public void testAnonymous() { doTestDecompiler(); }
|
||||
|
||||
private void doTestDecompiler() {
|
||||
String name = PluginPathManager.getPluginHomePath("java-decompiler") + "/testData/" + getName().substring(4);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,13 @@
|
||||
public class Anonymous {
|
||||
private int count = 0;
|
||||
|
||||
public Object produce() {
|
||||
final int id = count++;
|
||||
return new Object() {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "anonymous_" + id;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// Source code recreated from a .class file by IntelliJ IDEA
|
||||
// (powered by Fernflower decompiler)
|
||||
//
|
||||
|
||||
|
||||
public class Anonymous {
|
||||
|
||||
private int count = 0;
|
||||
|
||||
|
||||
public Anonymous() {
|
||||
}
|
||||
|
||||
public Object produce() {
|
||||
++this.count;
|
||||
final int var1 = this.count;
|
||||
return new Object() {
|
||||
public String toString() {
|
||||
return "anonymous_" + var1;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user