JS: create new common directory for all generated tests, migrate several tests there

This commit is contained in:
Alexey Andreev
2016-08-26 16:44:48 +03:00
parent 34a57f863b
commit 2bf0199959
321 changed files with 2123 additions and 2001 deletions
@@ -0,0 +1,31 @@
package foo
interface Base {
abstract fun foo(x: String): String
var prop: String
}
class BaseImpl(val s: String) : Base {
override fun foo(x: String) = "BaseImpl.foo: ${s}:${x}"
override var prop: String = "init"
set(value) {
field = "prop:${value}"
}
}
class Base2Impl(val s: String) : Base by BaseImpl("${s} by BaseImpl")
class Derived(val s: String) : Base by Base2Impl("${s} by Base2Impl")
fun box(): String {
assertEquals("BaseImpl.foo: Derived by Base2Impl by BaseImpl:!!", Derived("Derived").foo("!!"))
var d = Derived("Derived")
assertEquals("init", d.prop)
d.prop = "A"
assertEquals("prop:A", d.prop)
return "OK"
}