Minor, add reflection test on inherited Java property

This commit is contained in:
Alexander Udalov
2015-04-01 17:48:26 +03:00
parent 7fda4ef438
commit 4cea9ecca4
3 changed files with 18 additions and 0 deletions
@@ -0,0 +1,3 @@
public class J {
public String result = null;
}
@@ -0,0 +1,9 @@
class K : J()
fun box(): String {
val k = K()
val p = K::result
if (p.get(k) != null) return "Fail"
p.set(k, "OK")
return p.get(k)
}
@@ -174,6 +174,12 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/reflection"), Pattern.compile("^([^\\.]+)$"), true);
}
@TestMetadata("javaPropertyInheritedInKotlin")
public void testJavaPropertyInheritedInKotlin() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/javaPropertyInheritedInKotlin/");
doTestWithJava(fileName);
}
@TestMetadata("kotlinPropertyInheritedInJava")
public void testKotlinPropertyInheritedInJava() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/kotlinPropertyInheritedInJava/");