tests: Update box tests (1050294:id)

This commit is contained in:
Ilya Matveev
2017-04-24 17:17:41 +07:00
committed by ilmat192
parent 569ceff5f9
commit 8df15dca5a
96 changed files with 1165 additions and 145 deletions
@@ -0,0 +1,22 @@
interface IFoo {
fun foo(): String
}
interface IBar
private fun createAnonObject() =
object : IFoo, IBar {
override fun foo() = "foo"
fun qux(): String = "qux"
}
fun useAnonObject() {
createAnonObject().foo()
createAnonObject().qux()
}
fun box(): String {
if (createAnonObject().foo() != "foo") return "fail 1"
if (createAnonObject().qux() != "qux") return "fail 2"
return "OK"
}