Test with calling abstract wrapper which is implemented in Kotlin.

This commit is contained in:
Evgeny Gerashchenko
2013-06-21 00:13:32 +04:00
parent 1f2676becd
commit b4ce39aeb1
3 changed files with 19 additions and 0 deletions
@@ -0,0 +1,3 @@
interface JavaInterface {
void run(Runnable r);
}
@@ -0,0 +1,11 @@
class Impl: JavaInterface {
override fun run(r: Runnable?) {
r?.run()
}
}
fun box(): String {
var v = "FAIL"
Impl().run { v = "OK" }
return v
}
@@ -135,6 +135,11 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/codegen/boxWithJava/samAdapters"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("callAbstractAdapter.kt")
public void testCallAbstractAdapter() throws Exception {
doTestWithJava("compiler/testData/codegen/boxWithJava/samAdapters/callAbstractAdapter.kt");
}
@TestMetadata("comparator.kt")
public void testComparator() throws Exception {
doTestWithJava("compiler/testData/codegen/boxWithJava/samAdapters/comparator.kt");