JVM box tests for KT-21092
This commit is contained in:
committed by
TeamCityServer
parent
0841a6b0ea
commit
3f7a776fb8
Generated
+15
@@ -2050,11 +2050,26 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/callableReference/javaField.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt16752.kt")
|
||||
public void testKt16752() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt16752.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21014.kt")
|
||||
public void testKt21014() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21014.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21092a.kt")
|
||||
public void testKt21092a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21092a.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21092b.kt")
|
||||
public void testKt21092b() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21092b.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt37604.kt")
|
||||
public void testKt37604() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt37604.kt");
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
// IGNORE_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: PROPERTY_REFERENCES
|
||||
|
||||
val <T> T.foo get() = 42
|
||||
|
||||
class A
|
||||
|
||||
inline class Z(val x: Int)
|
||||
|
||||
fun box(): String {
|
||||
val test1 = A::foo.get(A())
|
||||
if (test1 != 42) throw Exception("test1: $test1")
|
||||
|
||||
val test2 = String::foo.get("")
|
||||
if (test2 != 42) throw Exception("test2: $test2")
|
||||
|
||||
val test3 = Int::foo.get(1)
|
||||
if (test3 != 42) throw Exception("test3: $test3")
|
||||
|
||||
val test4 = Z::foo.get(Z(1))
|
||||
if (test4 != 42) throw Exception("test4: $test4")
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A<T>(val b: T)
|
||||
|
||||
fun box(): String {
|
||||
val test = A(1).b::javaClass.get().simpleName
|
||||
if (test != "Integer") throw Exception("test: $test")
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+15
@@ -2050,11 +2050,26 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/callableReference/javaField.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt16752.kt")
|
||||
public void testKt16752() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt16752.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21014.kt")
|
||||
public void testKt21014() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21014.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21092a.kt")
|
||||
public void testKt21092a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21092a.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21092b.kt")
|
||||
public void testKt21092b() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21092b.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt37604.kt")
|
||||
public void testKt37604() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt37604.kt");
|
||||
|
||||
+15
@@ -2017,11 +2017,26 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CallableReference extends AbstractLightAnalysisModeTest {
|
||||
@TestMetadata("kt16752.kt")
|
||||
public void ignoreKt16752() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt16752.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21014.kt")
|
||||
public void ignoreKt21014() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21014.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21092a.kt")
|
||||
public void ignoreKt21092a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21092a.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21092b.kt")
|
||||
public void ignoreKt21092b() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21092b.kt");
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
+15
@@ -2050,11 +2050,26 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/callableReference/javaField.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt16752.kt")
|
||||
public void testKt16752() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt16752.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21014.kt")
|
||||
public void testKt21014() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21014.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21092a.kt")
|
||||
public void testKt21092a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21092a.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21092b.kt")
|
||||
public void testKt21092b() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21092b.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt37604.kt")
|
||||
public void testKt37604() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt37604.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+10
@@ -1470,11 +1470,21 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/callableReference/genericLocalClassConstructorReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt16752.kt")
|
||||
public void testKt16752() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt16752.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21014.kt")
|
||||
public void testKt21014() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21014.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21092a.kt")
|
||||
public void testKt21092a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21092a.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt37604.kt")
|
||||
public void testKt37604() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt37604.kt");
|
||||
|
||||
Generated
+10
@@ -1470,11 +1470,21 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/callableReference/genericLocalClassConstructorReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt16752.kt")
|
||||
public void testKt16752() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt16752.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21014.kt")
|
||||
public void testKt21014() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21014.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21092a.kt")
|
||||
public void testKt21092a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21092a.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt37604.kt")
|
||||
public void testKt37604() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt37604.kt");
|
||||
|
||||
Generated
+10
@@ -1470,11 +1470,21 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/callableReference/genericLocalClassConstructorReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt16752.kt")
|
||||
public void testKt16752() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt16752.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21014.kt")
|
||||
public void testKt21014() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21014.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt21092a.kt")
|
||||
public void testKt21092a() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt21092a.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt37604.kt")
|
||||
public void testKt37604() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/kt37604.kt");
|
||||
|
||||
Reference in New Issue
Block a user