Unit tests updated

This commit is contained in:
Stiver
2014-08-13 22:17:21 +02:00
parent 04b5c9abb1
commit 887c093afd
7 changed files with 120 additions and 7 deletions

View File

@@ -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");
}
}
}