Support default arguments and varargs for callable references
#KT-8834 #KT-19869 #KT-25514
This commit is contained in:
+63
@@ -2335,6 +2335,69 @@ 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.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/varargAndDefaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@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("inline.kt")
|
||||
public void testInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/inline.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("varargViewedAsArray.kt")
|
||||
public void testVarargViewedAsArray() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargViewedAsArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("varargWithDefaultValue.kt")
|
||||
public void testVarargWithDefaultValue() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/callableReference/varargAndDefaults/varargWithDefaultValue.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/casts")
|
||||
|
||||
Reference in New Issue
Block a user