summaryrefslogtreecommitdiffstats
path: root/test/unit/classes
diff options
context:
space:
mode:
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-09-01 15:05:08 +0400
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-09-01 15:11:41 +0400
commit3854b67daac14188d47a86bb6b84ccb00c087f5f (patch)
tree4138065e6b5d0c1b43b6f3fa2753492cf41661d4 /test/unit/classes
parent1a4e48d11d50b1c9367568ed60f6a43a469d4ace (diff)
downloadfernflower-3854b67daac14188d47a86bb6b84ccb00c087f5f.tar
fernflower-3854b67daac14188d47a86bb6b84ccb00c087f5f.tar.gz
fernflower-3854b67daac14188d47a86bb6b84ccb00c087f5f.tar.lz
fernflower-3854b67daac14188d47a86bb6b84ccb00c087f5f.tar.xz
fernflower-3854b67daac14188d47a86bb6b84ccb00c087f5f.zip
java-decompiler: post-import cleanup (tests reorganized)
Diffstat (limited to 'test/unit/classes')
-rw-r--r--test/unit/classes/TestClassFields.java13
-rw-r--r--test/unit/classes/TestClassLambda.java67
-rw-r--r--test/unit/classes/TestClassLoop.java48
-rw-r--r--test/unit/classes/TestClassSwitch.java16
-rw-r--r--test/unit/classes/TestClassTypes.java54
-rw-r--r--test/unit/classes/TestClassVar.java44
6 files changed, 0 insertions, 242 deletions
diff --git a/test/unit/classes/TestClassFields.java b/test/unit/classes/TestClassFields.java
deleted file mode 100644
index 8ae7449..0000000
--- a/test/unit/classes/TestClassFields.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package unit.classes;
-
-public class TestClassFields {
-
- private static int[] sizes;
- private static String[] names;
-
- static {
-
- names = new String[]{"name1", "name2"};
- sizes = new int[names.length];
- }
-}
diff --git a/test/unit/classes/TestClassLambda.java b/test/unit/classes/TestClassLambda.java
deleted file mode 100644
index a2b9d9a..0000000
--- a/test/unit/classes/TestClassLambda.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package unit.classes;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.OptionalInt;
-import java.util.function.IntBinaryOperator;
-import java.util.function.Supplier;
-
-public class TestClassLambda {
-
- public int field = 0;
-
- public void testLambda() {
-
- List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 6, 7);
- int b = (int)Math.random();
-
- list.forEach(n -> {int a = 2 * n; System.out.println(a + b + field);});
- }
-
- public void testLambda1() {
-
- int a = (int)Math.random();
-
- Runnable r = () -> { System.out.println("hello" + a); };
-
- Runnable r1 = () -> { System.out.println("hello1" + a); };
- }
-
- public void testLambda2() {
- reduce((left, right) -> Math.max(left, right));
- }
-
- public void testLambda3() { // IDEA-127301
- reduce(Math::max);
- }
-
- public void testLambda4() {
- reduce(TestClassLambda::localMax);
- }
-
- public void testLambda5() {
- String x = "abcd";
- function(x::toString);
- }
-
- public void testLambda6() {
- List<String> list = new ArrayList<String>();
- int bottom = list.size() * 2;
- int top = list.size() * 5;
- list.removeIf( s -> (bottom >= s.length() && s.length() <= top) );
- }
-
- public static OptionalInt reduce(IntBinaryOperator op) {
- return null;
- }
-
- public static String function(Supplier<String> supplier) {
- return supplier.get();
- }
-
- public static int localMax(int first, int second) {
- return 0;
- }
-
-}
diff --git a/test/unit/classes/TestClassLoop.java b/test/unit/classes/TestClassLoop.java
deleted file mode 100644
index 5288cf6..0000000
--- a/test/unit/classes/TestClassLoop.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package unit.classes;
-
-public class TestClassLoop {
-
- public static void testSimpleInfinite() {
-
- while(true) {
- System.out.println();
- }
-
- }
-
- public static void testFinally() {
-
- boolean a = (Math.random() > 0);
-
- while(true) {
- try {
- if(!a) {
- return;
- }
- } finally {
- System.out.println("1");
- }
- }
-
- }
-
- public static void testFinallyContinue() {
-
- boolean a = (Math.random() > 0);
-
- for(;;) {
- try {
- System.out.println("1");
- } finally {
- if(a) {
- System.out.println("3");
- continue;
- }
- }
-
- System.out.println("4");
- }
-
- }
-
-}
diff --git a/test/unit/classes/TestClassSwitch.java b/test/unit/classes/TestClassSwitch.java
deleted file mode 100644
index 3e29d5e..0000000
--- a/test/unit/classes/TestClassSwitch.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package unit.classes;
-
-public class TestClassSwitch {
-
- public void testCaseOrder(int a) {
-
- switch(a) {
- case 13:
- System.out.println(13);
- return;
- case 5:
- System.out.println(5);
- }
- }
-
-}
diff --git a/test/unit/classes/TestClassTypes.java b/test/unit/classes/TestClassTypes.java
deleted file mode 100644
index a8a5116..0000000
--- a/test/unit/classes/TestClassTypes.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package unit.classes;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class TestClassTypes {
-
- public void testBoolean() {
-
- byte var7 = 0;
- long time = System.currentTimeMillis();
-
- if(time % 2 > 0) {
- var7 = 1;
- } else if(time % 3 > 0) {
- var7 = 2;
- }
-
- if(var7 == 1) {
- System.out.println();
- }
- }
-
- public boolean testBit(int var0) {
- return (var0 & 1) == 1;
- }
-
- public void testSwitchConsts(int a) {
-
- switch (a) {
- case 88:
- System.out.println("1");
- break;
- case 656:
- System.out.println("2");
- break;
- case 65201:
- case 65489:
- System.out.println("3");
- }
- }
-
- public void testAssignmentType(List list) {
-
- List a = list;
-
- if(a != null) {
- (a = new ArrayList(a)).add("23");
- }
-
- System.out.println(a.size());
- }
-
-}
diff --git a/test/unit/classes/TestClassVar.java b/test/unit/classes/TestClassVar.java
deleted file mode 100644
index fdba5c6..0000000
--- a/test/unit/classes/TestClassVar.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package unit.classes;
-
-
-public class TestClassVar {
-
- private boolean field_boolean = (Math.random() > 0);
- public int field_int = 0;
-
- public void testFieldSSAU() {
-
- for(int i = 0; i < 10; i++) {
-
- try {
- System.out.println();
- } finally {
- if (field_boolean) {
- System.out.println();
- }
- }
-
- }
- }
-
- public Long testFieldSSAU1() { // IDEA-127466
- return new Long(field_int++);
- }
-
- public void testComplexPropagation() {
-
- int a = 0;
-
- while (a < 10) {
-
- int b = a;
-
- for(; a < 10 && a == 0; a++) {}
-
- if (b != a) {
- System.out.println();
- }
- }
- }
-
-}