test for obsolete KT-772
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user