group codegen test files into directories per test case

This commit is contained in:
Dmitry Jemerov
2011-05-13 12:30:28 +02:00
parent e57ed7401d
commit 5c2e90345a
24 changed files with 21 additions and 21 deletions
@@ -0,0 +1,33 @@
class Base() {
public val plain = 239
public val read : Int
get() = 239
public var readwrite : Int
get() = $readwrite + 1
set(n : Int) {
$readwrite = n
}
}
class Abstract {}
class Derived1() : Base(), Abstract {}
class Derived2() : Abstract, Base() {}
fun code(s : Base) : Int {
if (s.plain != 239) return 1
if (s.read != 239) return 2
s.readwrite = 238
if (s.readwrite != 239) return 3
return 0
}
fun test(s : Base) : Boolean = code(s) == 0
fun box() : String {
if (!test(new Base())) return "Fail #1"
if (!test(new Derived1())) return "Fail #2"
if (!test(new Derived2())) return "Fail #3"
return "OK"
}