Tests for callable references and inline classes
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int)
|
||||
inline class L(val x: Long)
|
||||
inline class S(val x: String)
|
||||
|
||||
fun Z.test() = x
|
||||
fun L.test() = x
|
||||
fun S.test() = x
|
||||
|
||||
fun box(): String {
|
||||
if (Z(42)::test.invoke() != 42) throw AssertionError()
|
||||
if (L(1234L)::test.invoke() != 1234L) throw AssertionError()
|
||||
if (S("abcdef")::test.invoke() != "abcdef") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int)
|
||||
inline class L(val x: Long)
|
||||
inline class S(val x: String)
|
||||
|
||||
val Z.xx get() = x
|
||||
val L.xx get() = x
|
||||
val S.xx get() = x
|
||||
|
||||
fun box(): String {
|
||||
if (Z(42)::xx.get() != 42) throw AssertionError()
|
||||
if (L(1234L)::xx.get() != 1234L) throw AssertionError()
|
||||
if (S("abcdef")::xx.get() != "abcdef") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int) {
|
||||
fun test() = x
|
||||
}
|
||||
|
||||
inline class L(val x: Long) {
|
||||
fun test() = x
|
||||
}
|
||||
|
||||
inline class S(val x: String) {
|
||||
fun test() = x
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (Z(42)::test.invoke() != 42) throw AssertionError()
|
||||
if (L(1234L)::test.invoke() != 1234L) throw AssertionError()
|
||||
if (S("abcdef")::test.invoke() != "abcdef") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int) {
|
||||
val xx get() = x
|
||||
}
|
||||
|
||||
inline class L(val x: Long) {
|
||||
val xx get() = x
|
||||
}
|
||||
|
||||
inline class S(val x: String) {
|
||||
val xx get() = x
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (Z(42)::xx.get() != 42) throw AssertionError()
|
||||
if (L(1234L)::xx.get() != 1234L) throw AssertionError()
|
||||
if (S("abcdef")::xx.get() != "abcdef") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int)
|
||||
inline class L(val x: Long)
|
||||
inline class S(val x: String)
|
||||
|
||||
fun box(): String {
|
||||
if (Z(42)::x.get() != 42) throw AssertionError()
|
||||
if (L(1234L)::x.get() != 1234L) throw AssertionError()
|
||||
if (S("abcdef")::x.get() != "abcdef") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int)
|
||||
inline class L(val x: Long)
|
||||
inline class S(val x: String)
|
||||
|
||||
fun test(aZ: Z, aL: L, aS: S) = "${aZ.x} ${aL.x} ${aS.x}"
|
||||
|
||||
fun box(): String {
|
||||
if (::test.invoke(Z(1), L(1L), S("abc")) != "1 1 abc") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int)
|
||||
inline class L(val x: Long)
|
||||
inline class S(val x: String)
|
||||
|
||||
fun Z.test() = x
|
||||
fun L.test() = x
|
||||
fun S.test() = x
|
||||
|
||||
fun box(): String {
|
||||
if (Z::test.invoke(Z(42)) != 42) throw AssertionError()
|
||||
if (L::test.invoke(L(1234L)) != 1234L) throw AssertionError()
|
||||
if (S::test.invoke(S("abcdef")) != "abcdef") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int)
|
||||
inline class L(val x: Long)
|
||||
inline class S(val x: String)
|
||||
|
||||
val Z.xx get() = x
|
||||
val L.xx get() = x
|
||||
val S.xx get() = x
|
||||
|
||||
fun box(): String {
|
||||
if ((Z::xx).get(Z(42)) != 42) throw AssertionError()
|
||||
if ((L::xx).get(L(1234L)) != 1234L) throw AssertionError()
|
||||
if ((S::xx).get(S("abcdef")) != "abcdef") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int) {
|
||||
fun test() = x
|
||||
}
|
||||
|
||||
inline class L(val x: Long) {
|
||||
fun test() = x
|
||||
}
|
||||
|
||||
inline class S(val x: String) {
|
||||
fun test() = x
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if (Z::test.invoke(Z(42)) != 42) throw AssertionError()
|
||||
if (L::test.invoke(L(1234L)) != 1234L) throw AssertionError()
|
||||
if (S::test.invoke(S("abcdef")) != "abcdef") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int) {
|
||||
val xx get() = x
|
||||
}
|
||||
|
||||
inline class L(val x: Long) {
|
||||
val xx get() = x
|
||||
}
|
||||
|
||||
inline class S(val x: String) {
|
||||
val xx get() = x
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
if ((Z::xx).get(Z(42)) != 42) throw AssertionError()
|
||||
if ((L::xx).get(L(1234L)) != 1234L) throw AssertionError()
|
||||
if ((S::xx).get(S("abcdef")) != "abcdef") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int)
|
||||
inline class L(val x: Long)
|
||||
inline class S(val x: String)
|
||||
|
||||
fun box(): String {
|
||||
if (42.let(::Z).x != 42) throw AssertionError()
|
||||
if (1234L.let(::L).x != 1234L) throw AssertionError()
|
||||
if ("abcdef".let(::S).x != "abcdef") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
inline class Z(val x: Int)
|
||||
inline class L(val x: Long)
|
||||
inline class S(val x: String)
|
||||
|
||||
fun box(): String {
|
||||
if ((Z::x).get(Z(42)) != 42) throw AssertionError()
|
||||
if ((L::x).get(L(1234L)) != 1234L) throw AssertionError()
|
||||
if ((S::x).get(S("abcdef")) != "abcdef") throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
inline class Z(val x: Int)
|
||||
|
||||
class C(var z: Z)
|
||||
|
||||
fun box(): String {
|
||||
val x = C(Z(42))
|
||||
|
||||
val ref = x::z
|
||||
|
||||
if (ref.get().x != 42) throw AssertionError()
|
||||
|
||||
ref.set(Z(1234))
|
||||
if (ref.get().x != 1234) throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
inline class Z(val x: Int)
|
||||
|
||||
class C(var z: Z)
|
||||
|
||||
fun box(): String {
|
||||
val ref = C::z
|
||||
|
||||
val x = C(Z(42))
|
||||
|
||||
if (ref.get(x).x != 42) throw AssertionError()
|
||||
|
||||
ref.set(x, Z(1234))
|
||||
if (ref.get(x).x != 1234) throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
inline class Z(val x: Int)
|
||||
|
||||
var topLevel = Z(42)
|
||||
|
||||
fun box(): String {
|
||||
val ref = ::topLevel
|
||||
|
||||
if (ref.get().x != 42) throw AssertionError()
|
||||
|
||||
ref.set(Z(1234))
|
||||
if (ref.get().x != 1234) throw AssertionError()
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+88
@@ -12029,6 +12029,94 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/callableReferences")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CallableReferences extends AbstractBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCallableReferences() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/callableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassExtensionFun.kt")
|
||||
public void testBoundInlineClassExtensionFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassExtensionVal.kt")
|
||||
public void testBoundInlineClassExtensionVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMemberFun.kt")
|
||||
public void testBoundInlineClassMemberFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMemberVal.kt")
|
||||
public void testBoundInlineClassMemberVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassPrimaryVal.kt")
|
||||
public void testBoundInlineClassPrimaryVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassPrimaryVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funWithInlineClassParameters.kt")
|
||||
public void testFunWithInlineClassParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/funWithInlineClassParameters.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassExtensionFun.kt")
|
||||
public void testInlineClassExtensionFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassExtensionVal.kt")
|
||||
public void testInlineClassExtensionVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassMemberFun.kt")
|
||||
public void testInlineClassMemberFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassMemberVal.kt")
|
||||
public void testInlineClassMemberVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassPrimaryConstructor.kt")
|
||||
public void testInlineClassPrimaryConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassPrimaryVal.kt")
|
||||
public void testInlineClassPrimaryVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeBoundMemberVar.kt")
|
||||
public void testInlineClassTypeBoundMemberVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeBoundMemberVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeMemberVar.kt")
|
||||
public void testInlineClassTypeMemberVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeMemberVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeTopLevelVar.kt")
|
||||
public void testInlineClassTypeTopLevelVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeTopLevelVar.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+88
@@ -12029,6 +12029,94 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/callableReferences")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CallableReferences extends AbstractLightAnalysisModeTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCallableReferences() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/callableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassExtensionFun.kt")
|
||||
public void testBoundInlineClassExtensionFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassExtensionVal.kt")
|
||||
public void testBoundInlineClassExtensionVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMemberFun.kt")
|
||||
public void testBoundInlineClassMemberFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMemberVal.kt")
|
||||
public void testBoundInlineClassMemberVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassPrimaryVal.kt")
|
||||
public void testBoundInlineClassPrimaryVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassPrimaryVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funWithInlineClassParameters.kt")
|
||||
public void testFunWithInlineClassParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/funWithInlineClassParameters.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassExtensionFun.kt")
|
||||
public void testInlineClassExtensionFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassExtensionVal.kt")
|
||||
public void testInlineClassExtensionVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassMemberFun.kt")
|
||||
public void testInlineClassMemberFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassMemberVal.kt")
|
||||
public void testInlineClassMemberVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassPrimaryConstructor.kt")
|
||||
public void testInlineClassPrimaryConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassPrimaryVal.kt")
|
||||
public void testInlineClassPrimaryVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeBoundMemberVar.kt")
|
||||
public void testInlineClassTypeBoundMemberVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeBoundMemberVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeMemberVar.kt")
|
||||
public void testInlineClassTypeMemberVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeMemberVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeTopLevelVar.kt")
|
||||
public void testInlineClassTypeTopLevelVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeTopLevelVar.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+88
@@ -12034,6 +12034,94 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/callableReferences")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CallableReferences extends AbstractIrBlackBoxCodegenTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCallableReferences() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/callableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassExtensionFun.kt")
|
||||
public void testBoundInlineClassExtensionFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassExtensionVal.kt")
|
||||
public void testBoundInlineClassExtensionVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMemberFun.kt")
|
||||
public void testBoundInlineClassMemberFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMemberVal.kt")
|
||||
public void testBoundInlineClassMemberVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassPrimaryVal.kt")
|
||||
public void testBoundInlineClassPrimaryVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassPrimaryVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funWithInlineClassParameters.kt")
|
||||
public void testFunWithInlineClassParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/funWithInlineClassParameters.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassExtensionFun.kt")
|
||||
public void testInlineClassExtensionFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassExtensionVal.kt")
|
||||
public void testInlineClassExtensionVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassMemberFun.kt")
|
||||
public void testInlineClassMemberFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassMemberVal.kt")
|
||||
public void testInlineClassMemberVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassPrimaryConstructor.kt")
|
||||
public void testInlineClassPrimaryConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassPrimaryVal.kt")
|
||||
public void testInlineClassPrimaryVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeBoundMemberVar.kt")
|
||||
public void testInlineClassTypeBoundMemberVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeBoundMemberVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeMemberVar.kt")
|
||||
public void testInlineClassTypeMemberVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeMemberVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeTopLevelVar.kt")
|
||||
public void testInlineClassTypeTopLevelVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeTopLevelVar.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+88
@@ -10549,6 +10549,94 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/callableReferences")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CallableReferences extends AbstractIrJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCallableReferences() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/callableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassExtensionFun.kt")
|
||||
public void testBoundInlineClassExtensionFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassExtensionVal.kt")
|
||||
public void testBoundInlineClassExtensionVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMemberFun.kt")
|
||||
public void testBoundInlineClassMemberFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMemberVal.kt")
|
||||
public void testBoundInlineClassMemberVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassPrimaryVal.kt")
|
||||
public void testBoundInlineClassPrimaryVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassPrimaryVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funWithInlineClassParameters.kt")
|
||||
public void testFunWithInlineClassParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/funWithInlineClassParameters.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassExtensionFun.kt")
|
||||
public void testInlineClassExtensionFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassExtensionVal.kt")
|
||||
public void testInlineClassExtensionVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassMemberFun.kt")
|
||||
public void testInlineClassMemberFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassMemberVal.kt")
|
||||
public void testInlineClassMemberVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassPrimaryConstructor.kt")
|
||||
public void testInlineClassPrimaryConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassPrimaryVal.kt")
|
||||
public void testInlineClassPrimaryVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeBoundMemberVar.kt")
|
||||
public void testInlineClassTypeBoundMemberVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeBoundMemberVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeMemberVar.kt")
|
||||
public void testInlineClassTypeMemberVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeMemberVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeTopLevelVar.kt")
|
||||
public void testInlineClassTypeTopLevelVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeTopLevelVar.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+88
@@ -11594,6 +11594,94 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/callableReferences")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CallableReferences extends AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCallableReferences() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/callableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassExtensionFun.kt")
|
||||
public void testBoundInlineClassExtensionFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassExtensionVal.kt")
|
||||
public void testBoundInlineClassExtensionVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassExtensionVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMemberFun.kt")
|
||||
public void testBoundInlineClassMemberFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMemberVal.kt")
|
||||
public void testBoundInlineClassMemberVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassMemberVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassPrimaryVal.kt")
|
||||
public void testBoundInlineClassPrimaryVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/boundInlineClassPrimaryVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funWithInlineClassParameters.kt")
|
||||
public void testFunWithInlineClassParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/funWithInlineClassParameters.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassExtensionFun.kt")
|
||||
public void testInlineClassExtensionFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassExtensionVal.kt")
|
||||
public void testInlineClassExtensionVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassExtensionVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassMemberFun.kt")
|
||||
public void testInlineClassMemberFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassMemberVal.kt")
|
||||
public void testInlineClassMemberVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassMemberVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassPrimaryConstructor.kt")
|
||||
public void testInlineClassPrimaryConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassPrimaryVal.kt")
|
||||
public void testInlineClassPrimaryVal() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassPrimaryVal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeBoundMemberVar.kt")
|
||||
public void testInlineClassTypeBoundMemberVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeBoundMemberVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeMemberVar.kt")
|
||||
public void testInlineClassTypeMemberVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeMemberVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeTopLevelVar.kt")
|
||||
public void testInlineClassTypeTopLevelVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/inlineClassTypeTopLevelVar.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/contextsAndAccessors")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user