JS: move more test to box tests

This commit is contained in:
Alexey Andreev
2016-08-30 15:31:53 +03:00
parent 3801052460
commit 34bf3e6e56
196 changed files with 1162 additions and 1293 deletions
+22
View File
@@ -0,0 +1,22 @@
package foo
open class Base() {
fun n(n: Int): Int = n + 1
}
interface Abstract {
}
class Derived1() : Base(), Abstract {
}
class Derived2() : Abstract, Base() {
}
fun test(s: Base): Boolean = s.n(238) == 239
fun box(): String {
if (!test(Base())) return "Fail #1"
if (!test(Derived1())) return "Fail #2"
if (!test(Derived2())) return "Fail #3"
return "OK"
}