test for obsolete KT-772

This commit is contained in:
Alex Tkachman
2011-12-19 07:47:26 +02:00
parent 7e93494e2f
commit c6b69cad2c
2 changed files with 30 additions and 0 deletions
@@ -0,0 +1,25 @@
namespace demo2
fun print(o : Any?) {}
fun test(i : Int) {
var monthString : String? = "<empty>"
when (i) {
1 => {
print(1)
print(2)
print(3)
print(4)
print(5)
}
else => {
monthString = "Invalid month"
}
}
print(monthString)
}
fun box() : String {
for (i in 1..12) test(i)
return "OK"
}
@@ -231,6 +231,11 @@ public class ControlStructuresTest extends CodegenTestCase {
// System.out.println(generateToText());
}
public void testKt772() throws Exception {
blackBoxFile("regressions/kt772.jet");
// System.out.println(generateToText());
}
public void testQuicksort() throws Exception {
blackBoxFile("controlStructures/quicksort.jet");
// System.out.println(generateToText());