summaryrefslogtreecommitdiffstats
path: root/src/test/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/input')
-rw-r--r--src/test/input/TestEclipse7.java59
-rw-r--r--src/test/input/TestJavac7.classbin0 -> 2397 bytes
-rw-r--r--src/test/input/TestJavac7.java59
-rw-r--r--src/test/input/TestJavac8.classbin0 -> 1330 bytes
-rw-r--r--src/test/input/TestJavac8.java58
-rw-r--r--src/test/input/TestLoop.java20
6 files changed, 196 insertions, 0 deletions
diff --git a/src/test/input/TestEclipse7.java b/src/test/input/TestEclipse7.java
new file mode 100644
index 0000000..f8bb127
--- /dev/null
+++ b/src/test/input/TestEclipse7.java
@@ -0,0 +1,59 @@
+package test.input;
+
+import java.io.FileReader;
+import java.io.IOException;
+import java.lang.reflect.Method;
+
+public class TestEclipse7 {
+
+
+// public void testTryResources() throws IOException {
+//
+// try (FileReader reader = new FileReader("file"); FileReader reader1 = new FileReader("file")) {
+// System.out.println();
+// }
+//
+// }
+//
+// public void testTryResources1() throws IOException {
+//
+// try (FileReader reader = new FileReader("file")) {
+// System.out.println("block");
+// } catch(RuntimeException ex) {
+// System.out.println(ex.toString());
+// } finally {
+// System.out.println("finally");
+// }
+//
+// }
+
+ public void testMultiCatch() {
+
+ try {
+ Method method = getClass().getDeclaredMethod("foo");
+ } catch (NoSuchMethodException | SecurityException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+// public void testSwitchString() {
+//
+// String s = "";
+// switch(s) {
+// case "Aa": // "xyz":
+// System.out.println("!");
+// break;
+// case "BB": // "abc":
+// System.out.println("?");
+// break;
+// case "__":
+// System.out.println("_");
+// break;
+// default:
+// System.out.println("#");
+// }
+//
+// }
+
+}
diff --git a/src/test/input/TestJavac7.class b/src/test/input/TestJavac7.class
new file mode 100644
index 0000000..ca63c8e
--- /dev/null
+++ b/src/test/input/TestJavac7.class
Binary files differ
diff --git a/src/test/input/TestJavac7.java b/src/test/input/TestJavac7.java
new file mode 100644
index 0000000..fb72d45
--- /dev/null
+++ b/src/test/input/TestJavac7.java
@@ -0,0 +1,59 @@
+package test.input;
+
+import java.io.FileReader;
+import java.io.IOException;
+import java.lang.reflect.Method;
+
+public class TestJavac7 {
+
+
+ public void testTryResources() throws IOException {
+
+ try (FileReader reader = new FileReader("file"); FileReader reader1 = new FileReader("file")) {
+ System.out.println();
+ }
+
+ }
+
+ public void testTryResources1() throws IOException {
+
+ try (FileReader reader = new FileReader("file")) {
+ System.out.println("block");
+ } catch(RuntimeException ex) {
+ System.out.println(ex.toString());
+ } finally {
+ System.out.println("finally");
+ }
+
+ }
+
+ public void testMultiCatch() {
+
+ try {
+ Method method = getClass().getDeclaredMethod("foo");
+ } catch (NoSuchMethodException | SecurityException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ public void testSwitchString() {
+
+ String s = "";
+ switch(s) {
+ case "Aa": // "xyz":
+ System.out.println("!");
+ break;
+ case "BB": // "abc":
+ System.out.println("?");
+ break;
+ case "__":
+ System.out.println("_");
+ break;
+ default:
+ System.out.println("#");
+ }
+
+ }
+
+}
diff --git a/src/test/input/TestJavac8.class b/src/test/input/TestJavac8.class
new file mode 100644
index 0000000..be9a40c
--- /dev/null
+++ b/src/test/input/TestJavac8.class
Binary files differ
diff --git a/src/test/input/TestJavac8.java b/src/test/input/TestJavac8.java
new file mode 100644
index 0000000..068750c
--- /dev/null
+++ b/src/test/input/TestJavac8.java
@@ -0,0 +1,58 @@
+package test.input;
+
+import java.io.FileReader;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.List;
+
+public class TestJavac8 {
+
+// public static void main(String args[]) {
+// new TestJavac8().testLambda();
+// }
+//
+// public void testTryResources() throws IOException {
+//
+// try (FileReader reader = new FileReader("file"); FileReader reader1 = new FileReader("file")) {
+// System.out.println();
+// }
+//
+// }
+//
+// public void testMultiCatch() {
+//
+// try {
+// Method method = getClass().getDeclaredMethod("foo");
+// } catch (NoSuchMethodException | SecurityException e) {
+// e.printStackTrace();
+// }
+// }
+//
+//
+// private void testSwitchString() {
+//
+// String s = "";
+// switch(s) {
+// case "Aa": // "xyz":
+// System.out.println("!");
+// break;
+// case "BB": // "abc":
+// System.out.println("?");
+// break;
+// case "__":
+// System.out.println("_");
+// break;
+// default:
+// System.out.println("#");
+// }
+//
+// }
+
+ public void testLambda() {
+
+ List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 6, 7);
+ list.forEach(n -> {int a = 2 * n; System.out.println(a);});
+ }
+
+}
diff --git a/src/test/input/TestLoop.java b/src/test/input/TestLoop.java
new file mode 100644
index 0000000..4275153
--- /dev/null
+++ b/src/test/input/TestLoop.java
@@ -0,0 +1,20 @@
+package test.input;
+
+public class TestLoop {
+
+ public static void main(String[] args) {
+
+ boolean a = true;
+ while(true) {
+ try {
+ if(!a) {
+ return;
+ }
+ } finally {
+ System.out.println("1");
+ }
+ }
+
+ }
+
+}