summaryrefslogtreecommitdiffstats
path: root/test/unit/classes
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/classes')
-rw-r--r--test/unit/classes/TestClassLoop.java36
-rw-r--r--test/unit/classes/TestClassSwitch.java16
-rw-r--r--test/unit/classes/TestClassTypes.java21
3 files changed, 69 insertions, 4 deletions
diff --git a/test/unit/classes/TestClassLoop.java b/test/unit/classes/TestClassLoop.java
index 4275153..5288cf6 100644
--- a/test/unit/classes/TestClassLoop.java
+++ b/test/unit/classes/TestClassLoop.java
@@ -1,10 +1,19 @@
-package test.input;
+package unit.classes;
-public class TestLoop {
+public class TestClassLoop {
- public static void main(String[] args) {
+ public static void testSimpleInfinite() {
- boolean a = true;
+ while(true) {
+ System.out.println();
+ }
+
+ }
+
+ public static void testFinally() {
+
+ boolean a = (Math.random() > 0);
+
while(true) {
try {
if(!a) {
@@ -16,5 +25,24 @@ public class TestLoop {
}
}
+
+ 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
new file mode 100644
index 0000000..3e29d5e
--- /dev/null
+++ b/test/unit/classes/TestClassSwitch.java
@@ -0,0 +1,16 @@
+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
new file mode 100644
index 0000000..0d0cba1
--- /dev/null
+++ b/test/unit/classes/TestClassTypes.java
@@ -0,0 +1,21 @@
+package unit.classes;
+
+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();
+ }
+ }
+
+}