Add some tests on adapted references with varargs and reflection

Also rename "varargAndDefaults" test directory to "adaptedReferences"
This commit is contained in:
Alexander Udalov
2020-04-06 18:44:36 +02:00
parent 66995fe1a5
commit fa879e667f
27 changed files with 718 additions and 674 deletions
@@ -1983,11 +1983,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/callableReference/nested.kt");
}
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/noReflectionForAdaptedCallableReferences.kt");
}
@TestMetadata("optimizedSuperclasses_after.kt")
public void testOptimizedSuperclasses_after() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/optimizedSuperclasses_after.kt");
@@ -1998,6 +1993,124 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/callableReference/optimizedSuperclasses_before.kt");
}
@TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class AdaptedReferences extends AbstractFirBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInAdaptedReferences() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/adaptedReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("bothWithCoercionToUnit.kt")
public void testBothWithCoercionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/bothWithCoercionToUnit.kt");
}
@TestMetadata("boundReferences.kt")
public void testBoundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/boundReferences.kt");
}
@TestMetadata("defaultAfterVararg.kt")
public void testDefaultAfterVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/defaultAfterVararg.kt");
}
@TestMetadata("defaultWithGenericExpectedType.kt")
public void testDefaultWithGenericExpectedType() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/defaultWithGenericExpectedType.kt");
}
@TestMetadata("emptyVarargAndDefault.kt")
public void testEmptyVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/emptyVarargAndDefault.kt");
}
@TestMetadata("inlineDefault.kt")
public void testInlineDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineDefault.kt");
}
@TestMetadata("inlineVararg.kt")
public void testInlineVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVararg.kt");
}
@TestMetadata("inlineVarargAndDefault.kt")
public void testInlineVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargAndDefault.kt");
}
@TestMetadata("inlineVarargInts.kt")
public void testInlineVarargInts() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargInts.kt");
}
@TestMetadata("innerConstructorWithVararg.kt")
public void testInnerConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/innerConstructorWithVararg.kt");
}
@TestMetadata("largeVararg.kt")
public void testLargeVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/largeVararg.kt");
}
@TestMetadata("localFunctionWithDefault.kt")
public void testLocalFunctionWithDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/localFunctionWithDefault.kt");
}
@TestMetadata("manyDefaultsAndVararg.kt")
public void testManyDefaultsAndVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/manyDefaultsAndVararg.kt");
}
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noReflectionForAdaptedCallableReferences.kt");
}
@TestMetadata("reflectionForVarargAsArray.kt")
public void testReflectionForVarargAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/reflectionForVarargAsArray.kt");
}
@TestMetadata("simpleDefaultArgument.kt")
public void testSimpleDefaultArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleDefaultArgument.kt");
}
@TestMetadata("simpleEmptyVararg.kt")
public void testSimpleEmptyVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
}
@TestMetadata("unboundReferences.kt")
public void testUnboundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/unboundReferences.kt");
}
@TestMetadata("varargViewedAsArray.kt")
public void testVarargViewedAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargViewedAsArray.kt");
}
@TestMetadata("varargViewedAsPrimitiveArray.kt")
public void testVarargViewedAsPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargViewedAsPrimitiveArray.kt");
}
@TestMetadata("varargWithDefaultValue.kt")
public void testVarargWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargWithDefaultValue.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/bound")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -2833,114 +2946,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/callableReference/serializability/withReflect.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/varargAndDefaults")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class VarargAndDefaults extends AbstractFirBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.JVM_IR, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInVarargAndDefaults() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/varargAndDefaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("bothWithCoercionToUnit.kt")
public void testBothWithCoercionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/bothWithCoercionToUnit.kt");
}
@TestMetadata("boundReferences.kt")
public void testBoundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/boundReferences.kt");
}
@TestMetadata("defaultAfterVararg.kt")
public void testDefaultAfterVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/defaultAfterVararg.kt");
}
@TestMetadata("defaultWithGenericExpectedType.kt")
public void testDefaultWithGenericExpectedType() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/defaultWithGenericExpectedType.kt");
}
@TestMetadata("emptyVarargAndDefault.kt")
public void testEmptyVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/emptyVarargAndDefault.kt");
}
@TestMetadata("inlineDefault.kt")
public void testInlineDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineDefault.kt");
}
@TestMetadata("inlineVararg.kt")
public void testInlineVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVararg.kt");
}
@TestMetadata("inlineVarargAndDefault.kt")
public void testInlineVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargAndDefault.kt");
}
@TestMetadata("inlineVarargInts.kt")
public void testInlineVarargInts() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargInts.kt");
}
@TestMetadata("innerConstructorWithVararg.kt")
public void testInnerConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/innerConstructorWithVararg.kt");
}
@TestMetadata("largeVararg.kt")
public void testLargeVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/largeVararg.kt");
}
@TestMetadata("localFunctionWithDefault.kt")
public void testLocalFunctionWithDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/localFunctionWithDefault.kt");
}
@TestMetadata("manyDefaultsAndVararg.kt")
public void testManyDefaultsAndVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/manyDefaultsAndVararg.kt");
}
@TestMetadata("simpleDefaultArgument.kt")
public void testSimpleDefaultArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleDefaultArgument.kt");
}
@TestMetadata("simpleEmptyVararg.kt")
public void testSimpleEmptyVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleEmptyVararg.kt");
}
@TestMetadata("unboundReferences.kt")
public void testUnboundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/unboundReferences.kt");
}
@TestMetadata("varargViewedAsArray.kt")
public void testVarargViewedAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsArray.kt");
}
@TestMetadata("varargViewedAsPrimitiveArray.kt")
public void testVarargViewedAsPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsPrimitiveArray.kt");
}
@TestMetadata("varargWithDefaultValue.kt")
public void testVarargWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargWithDefaultValue.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/box/casts")
@@ -1,19 +1,18 @@
// TARGET_BACKEND: JVM
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
import kotlin.reflect.KCallable
fun checkUnit(label: String, fn: () -> Unit) {
private fun check(label: String, fn: Any) {
if (fn is KCallable<*>) {
throw AssertionError("$label is KCallable, ${fn::class.java.simpleName}")
}
}
fun checkAny(label: String, fn: () -> Any) {
if (fn is KCallable<*>) {
throw AssertionError("$label is KCallable, ${fn::class.java.simpleName}")
}
}
fun checkUnit(label: String, fn: () -> Unit) = check(label, fn)
fun checkAny(label: String, fn: () -> Any) = check(label, fn)
fun checkOneElementForVararg(label: String, fn: (Int) -> Unit) = check(label, fn)
fun withDefaults(a: Int = 1, b: Int = 2) {}
fun withVarargs(vararg xs: Int) {}
@@ -33,5 +32,8 @@ fun box(): String {
checkUnit("::CWithDefaults", ::CWithDefaults)
checkUnit("::CWithVarargs", ::CWithVarargs)
checkOneElementForVararg("::withVarargs", ::withVarargs)
checkOneElementForVararg("::CWithVarargs", ::CWithVarargs)
return "OK"
}
@@ -0,0 +1,22 @@
// TARGET_BACKEND: JVM
// WITH_RUNTIME
import kotlin.reflect.KCallable
private fun check(label: String, fn: Any) {
if (fn !is KCallable<*>) {
throw AssertionError("$label is not KCallable, ${fn::class.java.simpleName}")
}
}
fun checkVarargAsArray(label: String, fn: (IntArray) -> C) = check(label, fn)
fun withVarargs(vararg xs: Int): C = C(*xs)
class C(vararg xs: Int)
fun box(): String {
checkVarargAsArray("::withVarargs", ::withVarargs)
checkVarargAsArray("::C", ::C)
return "OK"
}
@@ -2003,11 +2003,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/callableReference/nested.kt");
}
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/noReflectionForAdaptedCallableReferences.kt");
}
@TestMetadata("optimizedSuperclasses_after.kt")
public void testOptimizedSuperclasses_after() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/optimizedSuperclasses_after.kt");
@@ -2018,6 +2013,124 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/callableReference/optimizedSuperclasses_before.kt");
}
@TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class AdaptedReferences extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInAdaptedReferences() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/adaptedReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("bothWithCoercionToUnit.kt")
public void testBothWithCoercionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/bothWithCoercionToUnit.kt");
}
@TestMetadata("boundReferences.kt")
public void testBoundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/boundReferences.kt");
}
@TestMetadata("defaultAfterVararg.kt")
public void testDefaultAfterVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/defaultAfterVararg.kt");
}
@TestMetadata("defaultWithGenericExpectedType.kt")
public void testDefaultWithGenericExpectedType() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/defaultWithGenericExpectedType.kt");
}
@TestMetadata("emptyVarargAndDefault.kt")
public void testEmptyVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/emptyVarargAndDefault.kt");
}
@TestMetadata("inlineDefault.kt")
public void testInlineDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineDefault.kt");
}
@TestMetadata("inlineVararg.kt")
public void testInlineVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVararg.kt");
}
@TestMetadata("inlineVarargAndDefault.kt")
public void testInlineVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargAndDefault.kt");
}
@TestMetadata("inlineVarargInts.kt")
public void testInlineVarargInts() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargInts.kt");
}
@TestMetadata("innerConstructorWithVararg.kt")
public void testInnerConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/innerConstructorWithVararg.kt");
}
@TestMetadata("largeVararg.kt")
public void testLargeVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/largeVararg.kt");
}
@TestMetadata("localFunctionWithDefault.kt")
public void testLocalFunctionWithDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/localFunctionWithDefault.kt");
}
@TestMetadata("manyDefaultsAndVararg.kt")
public void testManyDefaultsAndVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/manyDefaultsAndVararg.kt");
}
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noReflectionForAdaptedCallableReferences.kt");
}
@TestMetadata("reflectionForVarargAsArray.kt")
public void testReflectionForVarargAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/reflectionForVarargAsArray.kt");
}
@TestMetadata("simpleDefaultArgument.kt")
public void testSimpleDefaultArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleDefaultArgument.kt");
}
@TestMetadata("simpleEmptyVararg.kt")
public void testSimpleEmptyVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
}
@TestMetadata("unboundReferences.kt")
public void testUnboundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/unboundReferences.kt");
}
@TestMetadata("varargViewedAsArray.kt")
public void testVarargViewedAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargViewedAsArray.kt");
}
@TestMetadata("varargViewedAsPrimitiveArray.kt")
public void testVarargViewedAsPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargViewedAsPrimitiveArray.kt");
}
@TestMetadata("varargWithDefaultValue.kt")
public void testVarargWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargWithDefaultValue.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/bound")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -2853,114 +2966,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/callableReference/serializability/withReflect.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/varargAndDefaults")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class VarargAndDefaults extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInVarargAndDefaults() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/varargAndDefaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("bothWithCoercionToUnit.kt")
public void testBothWithCoercionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/bothWithCoercionToUnit.kt");
}
@TestMetadata("boundReferences.kt")
public void testBoundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/boundReferences.kt");
}
@TestMetadata("defaultAfterVararg.kt")
public void testDefaultAfterVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/defaultAfterVararg.kt");
}
@TestMetadata("defaultWithGenericExpectedType.kt")
public void testDefaultWithGenericExpectedType() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/defaultWithGenericExpectedType.kt");
}
@TestMetadata("emptyVarargAndDefault.kt")
public void testEmptyVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/emptyVarargAndDefault.kt");
}
@TestMetadata("inlineDefault.kt")
public void testInlineDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineDefault.kt");
}
@TestMetadata("inlineVararg.kt")
public void testInlineVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVararg.kt");
}
@TestMetadata("inlineVarargAndDefault.kt")
public void testInlineVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargAndDefault.kt");
}
@TestMetadata("inlineVarargInts.kt")
public void testInlineVarargInts() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargInts.kt");
}
@TestMetadata("innerConstructorWithVararg.kt")
public void testInnerConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/innerConstructorWithVararg.kt");
}
@TestMetadata("largeVararg.kt")
public void testLargeVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/largeVararg.kt");
}
@TestMetadata("localFunctionWithDefault.kt")
public void testLocalFunctionWithDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/localFunctionWithDefault.kt");
}
@TestMetadata("manyDefaultsAndVararg.kt")
public void testManyDefaultsAndVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/manyDefaultsAndVararg.kt");
}
@TestMetadata("simpleDefaultArgument.kt")
public void testSimpleDefaultArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleDefaultArgument.kt");
}
@TestMetadata("simpleEmptyVararg.kt")
public void testSimpleEmptyVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleEmptyVararg.kt");
}
@TestMetadata("unboundReferences.kt")
public void testUnboundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/unboundReferences.kt");
}
@TestMetadata("varargViewedAsArray.kt")
public void testVarargViewedAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsArray.kt");
}
@TestMetadata("varargViewedAsPrimitiveArray.kt")
public void testVarargViewedAsPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsPrimitiveArray.kt");
}
@TestMetadata("varargWithDefaultValue.kt")
public void testVarargWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargWithDefaultValue.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/box/casts")
@@ -2003,11 +2003,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/callableReference/nested.kt");
}
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/noReflectionForAdaptedCallableReferences.kt");
}
@TestMetadata("optimizedSuperclasses_after.kt")
public void testOptimizedSuperclasses_after() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/optimizedSuperclasses_after.kt");
@@ -2018,6 +2013,124 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/callableReference/optimizedSuperclasses_before.kt");
}
@TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class AdaptedReferences extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInAdaptedReferences() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/adaptedReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("bothWithCoercionToUnit.kt")
public void testBothWithCoercionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/bothWithCoercionToUnit.kt");
}
@TestMetadata("boundReferences.kt")
public void testBoundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/boundReferences.kt");
}
@TestMetadata("defaultAfterVararg.kt")
public void testDefaultAfterVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/defaultAfterVararg.kt");
}
@TestMetadata("defaultWithGenericExpectedType.kt")
public void testDefaultWithGenericExpectedType() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/defaultWithGenericExpectedType.kt");
}
@TestMetadata("emptyVarargAndDefault.kt")
public void testEmptyVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/emptyVarargAndDefault.kt");
}
@TestMetadata("inlineDefault.kt")
public void testInlineDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineDefault.kt");
}
@TestMetadata("inlineVararg.kt")
public void testInlineVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVararg.kt");
}
@TestMetadata("inlineVarargAndDefault.kt")
public void testInlineVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargAndDefault.kt");
}
@TestMetadata("inlineVarargInts.kt")
public void testInlineVarargInts() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargInts.kt");
}
@TestMetadata("innerConstructorWithVararg.kt")
public void testInnerConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/innerConstructorWithVararg.kt");
}
@TestMetadata("largeVararg.kt")
public void testLargeVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/largeVararg.kt");
}
@TestMetadata("localFunctionWithDefault.kt")
public void testLocalFunctionWithDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/localFunctionWithDefault.kt");
}
@TestMetadata("manyDefaultsAndVararg.kt")
public void testManyDefaultsAndVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/manyDefaultsAndVararg.kt");
}
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noReflectionForAdaptedCallableReferences.kt");
}
@TestMetadata("reflectionForVarargAsArray.kt")
public void testReflectionForVarargAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/reflectionForVarargAsArray.kt");
}
@TestMetadata("simpleDefaultArgument.kt")
public void testSimpleDefaultArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleDefaultArgument.kt");
}
@TestMetadata("simpleEmptyVararg.kt")
public void testSimpleEmptyVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
}
@TestMetadata("unboundReferences.kt")
public void testUnboundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/unboundReferences.kt");
}
@TestMetadata("varargViewedAsArray.kt")
public void testVarargViewedAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargViewedAsArray.kt");
}
@TestMetadata("varargViewedAsPrimitiveArray.kt")
public void testVarargViewedAsPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargViewedAsPrimitiveArray.kt");
}
@TestMetadata("varargWithDefaultValue.kt")
public void testVarargWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargWithDefaultValue.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/bound")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -2853,114 +2966,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/callableReference/serializability/withReflect.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/varargAndDefaults")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class VarargAndDefaults extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInVarargAndDefaults() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/varargAndDefaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("bothWithCoercionToUnit.kt")
public void testBothWithCoercionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/bothWithCoercionToUnit.kt");
}
@TestMetadata("boundReferences.kt")
public void testBoundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/boundReferences.kt");
}
@TestMetadata("defaultAfterVararg.kt")
public void testDefaultAfterVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/defaultAfterVararg.kt");
}
@TestMetadata("defaultWithGenericExpectedType.kt")
public void testDefaultWithGenericExpectedType() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/defaultWithGenericExpectedType.kt");
}
@TestMetadata("emptyVarargAndDefault.kt")
public void testEmptyVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/emptyVarargAndDefault.kt");
}
@TestMetadata("inlineDefault.kt")
public void testInlineDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineDefault.kt");
}
@TestMetadata("inlineVararg.kt")
public void testInlineVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVararg.kt");
}
@TestMetadata("inlineVarargAndDefault.kt")
public void testInlineVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargAndDefault.kt");
}
@TestMetadata("inlineVarargInts.kt")
public void testInlineVarargInts() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargInts.kt");
}
@TestMetadata("innerConstructorWithVararg.kt")
public void testInnerConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/innerConstructorWithVararg.kt");
}
@TestMetadata("largeVararg.kt")
public void testLargeVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/largeVararg.kt");
}
@TestMetadata("localFunctionWithDefault.kt")
public void testLocalFunctionWithDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/localFunctionWithDefault.kt");
}
@TestMetadata("manyDefaultsAndVararg.kt")
public void testManyDefaultsAndVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/manyDefaultsAndVararg.kt");
}
@TestMetadata("simpleDefaultArgument.kt")
public void testSimpleDefaultArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleDefaultArgument.kt");
}
@TestMetadata("simpleEmptyVararg.kt")
public void testSimpleEmptyVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleEmptyVararg.kt");
}
@TestMetadata("unboundReferences.kt")
public void testUnboundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/unboundReferences.kt");
}
@TestMetadata("varargViewedAsArray.kt")
public void testVarargViewedAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsArray.kt");
}
@TestMetadata("varargViewedAsPrimitiveArray.kt")
public void testVarargViewedAsPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsPrimitiveArray.kt");
}
@TestMetadata("varargWithDefaultValue.kt")
public void testVarargWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargWithDefaultValue.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/box/casts")
@@ -1983,11 +1983,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/callableReference/nested.kt");
}
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/noReflectionForAdaptedCallableReferences.kt");
}
@TestMetadata("optimizedSuperclasses_after.kt")
public void testOptimizedSuperclasses_after() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/optimizedSuperclasses_after.kt");
@@ -1998,6 +1993,124 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/callableReference/optimizedSuperclasses_before.kt");
}
@TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class AdaptedReferences extends AbstractIrBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInAdaptedReferences() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/adaptedReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("bothWithCoercionToUnit.kt")
public void testBothWithCoercionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/bothWithCoercionToUnit.kt");
}
@TestMetadata("boundReferences.kt")
public void testBoundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/boundReferences.kt");
}
@TestMetadata("defaultAfterVararg.kt")
public void testDefaultAfterVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/defaultAfterVararg.kt");
}
@TestMetadata("defaultWithGenericExpectedType.kt")
public void testDefaultWithGenericExpectedType() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/defaultWithGenericExpectedType.kt");
}
@TestMetadata("emptyVarargAndDefault.kt")
public void testEmptyVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/emptyVarargAndDefault.kt");
}
@TestMetadata("inlineDefault.kt")
public void testInlineDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineDefault.kt");
}
@TestMetadata("inlineVararg.kt")
public void testInlineVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVararg.kt");
}
@TestMetadata("inlineVarargAndDefault.kt")
public void testInlineVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargAndDefault.kt");
}
@TestMetadata("inlineVarargInts.kt")
public void testInlineVarargInts() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargInts.kt");
}
@TestMetadata("innerConstructorWithVararg.kt")
public void testInnerConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/innerConstructorWithVararg.kt");
}
@TestMetadata("largeVararg.kt")
public void testLargeVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/largeVararg.kt");
}
@TestMetadata("localFunctionWithDefault.kt")
public void testLocalFunctionWithDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/localFunctionWithDefault.kt");
}
@TestMetadata("manyDefaultsAndVararg.kt")
public void testManyDefaultsAndVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/manyDefaultsAndVararg.kt");
}
@TestMetadata("noReflectionForAdaptedCallableReferences.kt")
public void testNoReflectionForAdaptedCallableReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/noReflectionForAdaptedCallableReferences.kt");
}
@TestMetadata("reflectionForVarargAsArray.kt")
public void testReflectionForVarargAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/reflectionForVarargAsArray.kt");
}
@TestMetadata("simpleDefaultArgument.kt")
public void testSimpleDefaultArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleDefaultArgument.kt");
}
@TestMetadata("simpleEmptyVararg.kt")
public void testSimpleEmptyVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
}
@TestMetadata("unboundReferences.kt")
public void testUnboundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/unboundReferences.kt");
}
@TestMetadata("varargViewedAsArray.kt")
public void testVarargViewedAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargViewedAsArray.kt");
}
@TestMetadata("varargViewedAsPrimitiveArray.kt")
public void testVarargViewedAsPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargViewedAsPrimitiveArray.kt");
}
@TestMetadata("varargWithDefaultValue.kt")
public void testVarargWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargWithDefaultValue.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/bound")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -2833,114 +2946,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/callableReference/serializability/withReflect.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/varargAndDefaults")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class VarargAndDefaults extends AbstractIrBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInVarargAndDefaults() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/varargAndDefaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("bothWithCoercionToUnit.kt")
public void testBothWithCoercionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/bothWithCoercionToUnit.kt");
}
@TestMetadata("boundReferences.kt")
public void testBoundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/boundReferences.kt");
}
@TestMetadata("defaultAfterVararg.kt")
public void testDefaultAfterVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/defaultAfterVararg.kt");
}
@TestMetadata("defaultWithGenericExpectedType.kt")
public void testDefaultWithGenericExpectedType() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/defaultWithGenericExpectedType.kt");
}
@TestMetadata("emptyVarargAndDefault.kt")
public void testEmptyVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/emptyVarargAndDefault.kt");
}
@TestMetadata("inlineDefault.kt")
public void testInlineDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineDefault.kt");
}
@TestMetadata("inlineVararg.kt")
public void testInlineVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVararg.kt");
}
@TestMetadata("inlineVarargAndDefault.kt")
public void testInlineVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargAndDefault.kt");
}
@TestMetadata("inlineVarargInts.kt")
public void testInlineVarargInts() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargInts.kt");
}
@TestMetadata("innerConstructorWithVararg.kt")
public void testInnerConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/innerConstructorWithVararg.kt");
}
@TestMetadata("largeVararg.kt")
public void testLargeVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/largeVararg.kt");
}
@TestMetadata("localFunctionWithDefault.kt")
public void testLocalFunctionWithDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/localFunctionWithDefault.kt");
}
@TestMetadata("manyDefaultsAndVararg.kt")
public void testManyDefaultsAndVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/manyDefaultsAndVararg.kt");
}
@TestMetadata("simpleDefaultArgument.kt")
public void testSimpleDefaultArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleDefaultArgument.kt");
}
@TestMetadata("simpleEmptyVararg.kt")
public void testSimpleEmptyVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleEmptyVararg.kt");
}
@TestMetadata("unboundReferences.kt")
public void testUnboundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/unboundReferences.kt");
}
@TestMetadata("varargViewedAsArray.kt")
public void testVarargViewedAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsArray.kt");
}
@TestMetadata("varargViewedAsPrimitiveArray.kt")
public void testVarargViewedAsPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsPrimitiveArray.kt");
}
@TestMetadata("varargWithDefaultValue.kt")
public void testVarargWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargWithDefaultValue.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/box/casts")
@@ -1433,6 +1433,114 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/callableReference/nested.kt");
}
@TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class AdaptedReferences extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInAdaptedReferences() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/adaptedReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("bothWithCoercionToUnit.kt")
public void testBothWithCoercionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/bothWithCoercionToUnit.kt");
}
@TestMetadata("boundReferences.kt")
public void testBoundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/boundReferences.kt");
}
@TestMetadata("defaultAfterVararg.kt")
public void testDefaultAfterVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/defaultAfterVararg.kt");
}
@TestMetadata("defaultWithGenericExpectedType.kt")
public void testDefaultWithGenericExpectedType() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/defaultWithGenericExpectedType.kt");
}
@TestMetadata("emptyVarargAndDefault.kt")
public void testEmptyVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/emptyVarargAndDefault.kt");
}
@TestMetadata("inlineDefault.kt")
public void testInlineDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineDefault.kt");
}
@TestMetadata("inlineVararg.kt")
public void testInlineVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVararg.kt");
}
@TestMetadata("inlineVarargAndDefault.kt")
public void testInlineVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargAndDefault.kt");
}
@TestMetadata("inlineVarargInts.kt")
public void testInlineVarargInts() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargInts.kt");
}
@TestMetadata("innerConstructorWithVararg.kt")
public void testInnerConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/innerConstructorWithVararg.kt");
}
@TestMetadata("largeVararg.kt")
public void testLargeVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/largeVararg.kt");
}
@TestMetadata("localFunctionWithDefault.kt")
public void testLocalFunctionWithDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/localFunctionWithDefault.kt");
}
@TestMetadata("manyDefaultsAndVararg.kt")
public void testManyDefaultsAndVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/manyDefaultsAndVararg.kt");
}
@TestMetadata("simpleDefaultArgument.kt")
public void testSimpleDefaultArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleDefaultArgument.kt");
}
@TestMetadata("simpleEmptyVararg.kt")
public void testSimpleEmptyVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
}
@TestMetadata("unboundReferences.kt")
public void testUnboundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/unboundReferences.kt");
}
@TestMetadata("varargViewedAsArray.kt")
public void testVarargViewedAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargViewedAsArray.kt");
}
@TestMetadata("varargViewedAsPrimitiveArray.kt")
public void testVarargViewedAsPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargViewedAsPrimitiveArray.kt");
}
@TestMetadata("varargWithDefaultValue.kt")
public void testVarargWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargWithDefaultValue.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/bound")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -2208,114 +2316,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/serializability"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/varargAndDefaults")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class VarargAndDefaults extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInVarargAndDefaults() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/varargAndDefaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@TestMetadata("bothWithCoercionToUnit.kt")
public void testBothWithCoercionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/bothWithCoercionToUnit.kt");
}
@TestMetadata("boundReferences.kt")
public void testBoundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/boundReferences.kt");
}
@TestMetadata("defaultAfterVararg.kt")
public void testDefaultAfterVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/defaultAfterVararg.kt");
}
@TestMetadata("defaultWithGenericExpectedType.kt")
public void testDefaultWithGenericExpectedType() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/defaultWithGenericExpectedType.kt");
}
@TestMetadata("emptyVarargAndDefault.kt")
public void testEmptyVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/emptyVarargAndDefault.kt");
}
@TestMetadata("inlineDefault.kt")
public void testInlineDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineDefault.kt");
}
@TestMetadata("inlineVararg.kt")
public void testInlineVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVararg.kt");
}
@TestMetadata("inlineVarargAndDefault.kt")
public void testInlineVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargAndDefault.kt");
}
@TestMetadata("inlineVarargInts.kt")
public void testInlineVarargInts() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargInts.kt");
}
@TestMetadata("innerConstructorWithVararg.kt")
public void testInnerConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/innerConstructorWithVararg.kt");
}
@TestMetadata("largeVararg.kt")
public void testLargeVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/largeVararg.kt");
}
@TestMetadata("localFunctionWithDefault.kt")
public void testLocalFunctionWithDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/localFunctionWithDefault.kt");
}
@TestMetadata("manyDefaultsAndVararg.kt")
public void testManyDefaultsAndVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/manyDefaultsAndVararg.kt");
}
@TestMetadata("simpleDefaultArgument.kt")
public void testSimpleDefaultArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleDefaultArgument.kt");
}
@TestMetadata("simpleEmptyVararg.kt")
public void testSimpleEmptyVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleEmptyVararg.kt");
}
@TestMetadata("unboundReferences.kt")
public void testUnboundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/unboundReferences.kt");
}
@TestMetadata("varargViewedAsArray.kt")
public void testVarargViewedAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsArray.kt");
}
@TestMetadata("varargViewedAsPrimitiveArray.kt")
public void testVarargViewedAsPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsPrimitiveArray.kt");
}
@TestMetadata("varargWithDefaultValue.kt")
public void testVarargWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargWithDefaultValue.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/box/casts")
@@ -1433,6 +1433,114 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/callableReference/nested.kt");
}
@TestMetadata("compiler/testData/codegen/box/callableReference/adaptedReferences")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class AdaptedReferences extends AbstractJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInAdaptedReferences() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/adaptedReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("bothWithCoercionToUnit.kt")
public void testBothWithCoercionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/bothWithCoercionToUnit.kt");
}
@TestMetadata("boundReferences.kt")
public void testBoundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/boundReferences.kt");
}
@TestMetadata("defaultAfterVararg.kt")
public void testDefaultAfterVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/defaultAfterVararg.kt");
}
@TestMetadata("defaultWithGenericExpectedType.kt")
public void testDefaultWithGenericExpectedType() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/defaultWithGenericExpectedType.kt");
}
@TestMetadata("emptyVarargAndDefault.kt")
public void testEmptyVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/emptyVarargAndDefault.kt");
}
@TestMetadata("inlineDefault.kt")
public void testInlineDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineDefault.kt");
}
@TestMetadata("inlineVararg.kt")
public void testInlineVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVararg.kt");
}
@TestMetadata("inlineVarargAndDefault.kt")
public void testInlineVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargAndDefault.kt");
}
@TestMetadata("inlineVarargInts.kt")
public void testInlineVarargInts() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/inlineVarargInts.kt");
}
@TestMetadata("innerConstructorWithVararg.kt")
public void testInnerConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/innerConstructorWithVararg.kt");
}
@TestMetadata("largeVararg.kt")
public void testLargeVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/largeVararg.kt");
}
@TestMetadata("localFunctionWithDefault.kt")
public void testLocalFunctionWithDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/localFunctionWithDefault.kt");
}
@TestMetadata("manyDefaultsAndVararg.kt")
public void testManyDefaultsAndVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/manyDefaultsAndVararg.kt");
}
@TestMetadata("simpleDefaultArgument.kt")
public void testSimpleDefaultArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleDefaultArgument.kt");
}
@TestMetadata("simpleEmptyVararg.kt")
public void testSimpleEmptyVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/simpleEmptyVararg.kt");
}
@TestMetadata("unboundReferences.kt")
public void testUnboundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/unboundReferences.kt");
}
@TestMetadata("varargViewedAsArray.kt")
public void testVarargViewedAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargViewedAsArray.kt");
}
@TestMetadata("varargViewedAsPrimitiveArray.kt")
public void testVarargViewedAsPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargViewedAsPrimitiveArray.kt");
}
@TestMetadata("varargWithDefaultValue.kt")
public void testVarargWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/adaptedReferences/varargWithDefaultValue.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/bound")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -2208,114 +2316,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/serializability"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
}
@TestMetadata("compiler/testData/codegen/box/callableReference/varargAndDefaults")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class VarargAndDefaults extends AbstractJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInVarargAndDefaults() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/callableReference/varargAndDefaults"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@TestMetadata("bothWithCoercionToUnit.kt")
public void testBothWithCoercionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/bothWithCoercionToUnit.kt");
}
@TestMetadata("boundReferences.kt")
public void testBoundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/boundReferences.kt");
}
@TestMetadata("defaultAfterVararg.kt")
public void testDefaultAfterVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/defaultAfterVararg.kt");
}
@TestMetadata("defaultWithGenericExpectedType.kt")
public void testDefaultWithGenericExpectedType() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/defaultWithGenericExpectedType.kt");
}
@TestMetadata("emptyVarargAndDefault.kt")
public void testEmptyVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/emptyVarargAndDefault.kt");
}
@TestMetadata("inlineDefault.kt")
public void testInlineDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineDefault.kt");
}
@TestMetadata("inlineVararg.kt")
public void testInlineVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVararg.kt");
}
@TestMetadata("inlineVarargAndDefault.kt")
public void testInlineVarargAndDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargAndDefault.kt");
}
@TestMetadata("inlineVarargInts.kt")
public void testInlineVarargInts() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inlineVarargInts.kt");
}
@TestMetadata("innerConstructorWithVararg.kt")
public void testInnerConstructorWithVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/innerConstructorWithVararg.kt");
}
@TestMetadata("largeVararg.kt")
public void testLargeVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/largeVararg.kt");
}
@TestMetadata("localFunctionWithDefault.kt")
public void testLocalFunctionWithDefault() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/localFunctionWithDefault.kt");
}
@TestMetadata("manyDefaultsAndVararg.kt")
public void testManyDefaultsAndVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/manyDefaultsAndVararg.kt");
}
@TestMetadata("simpleDefaultArgument.kt")
public void testSimpleDefaultArgument() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleDefaultArgument.kt");
}
@TestMetadata("simpleEmptyVararg.kt")
public void testSimpleEmptyVararg() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/simpleEmptyVararg.kt");
}
@TestMetadata("unboundReferences.kt")
public void testUnboundReferences() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/unboundReferences.kt");
}
@TestMetadata("varargViewedAsArray.kt")
public void testVarargViewedAsArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsArray.kt");
}
@TestMetadata("varargViewedAsPrimitiveArray.kt")
public void testVarargViewedAsPrimitiveArray() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsPrimitiveArray.kt");
}
@TestMetadata("varargWithDefaultValue.kt")
public void testVarargWithDefaultValue() throws Exception {
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargWithDefaultValue.kt");
}
}
}
@TestMetadata("compiler/testData/codegen/box/casts")