Minor: move callable reference IR tests to a separate directory

This commit is contained in:
Dmitry Petrov
2020-01-21 13:26:12 +03:00
parent c5f14a29a4
commit 38b90b7fbd
17 changed files with 86 additions and 60 deletions
@@ -787,31 +787,6 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
runTest("compiler/testData/ir/irText/expressions/callWithReorderedArguments.kt");
}
@TestMetadata("callableRefToGenericMember.kt")
public void testCallableRefToGenericMember() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableRefToGenericMember.kt");
}
@TestMetadata("callableReferenceToImportedFromObject.kt")
public void testCallableReferenceToImportedFromObject() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferenceToImportedFromObject.kt");
}
@TestMetadata("callableReferenceTypeArguments.kt")
public void testCallableReferenceTypeArguments() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.kt");
}
@TestMetadata("callableReferenceWithArgumentsConversion.kt")
public void testCallableReferenceWithArgumentsConversion() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferenceWithArgumentsConversion.kt");
}
@TestMetadata("callableReferenceWithVarargViewedAsArray.kt")
public void testCallableReferenceWithVarargViewedAsArray() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferenceWithVarargViewedAsArray.kt");
}
@TestMetadata("calls.kt")
public void testCalls() throws Exception {
runTest("compiler/testData/ir/irText/expressions/calls.kt");
@@ -1362,6 +1337,44 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
runTest("compiler/testData/ir/irText/expressions/whileDoWhile.kt");
}
@TestMetadata("compiler/testData/ir/irText/expressions/callableReferences")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class CallableReferences extends AbstractFir2IrTextTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTestWithCustomIgnoreDirective(this::doTest, TargetBackend.ANY, testDataFilePath, "// IGNORE_BACKEND_FIR: ");
}
public void testAllFilesPresentInCallableReferences() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("genericMember.kt")
public void testGenericMember() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferences/genericMember.kt");
}
@TestMetadata("importedFromObject.kt")
public void testImportedFromObject() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferences/importedFromObject.kt");
}
@TestMetadata("typeArguments.kt")
public void testTypeArguments() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferences/typeArguments.kt");
}
@TestMetadata("withAdaptedArguments.kt")
public void testWithAdaptedArguments() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.kt");
}
@TestMetadata("withVarargViewedAsArray.kt")
public void testWithVarargViewedAsArray() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt");
}
}
@TestMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -1,4 +1,4 @@
FILE fqName:<root> fileName:/callableRefToGenericMember.kt
FILE fqName:<root> fileName:/genericMember.kt
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
@@ -1,4 +1,4 @@
FILE fqName:<root> fileName:/callableRefToGenericMember.kt
FILE fqName:<root> fileName:/genericMember.kt
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A<T of <root>.A>
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
@@ -1,4 +1,4 @@
FILE fqName:test fileName:/callableReferenceToImportedFromObject.kt
FILE fqName:test fileName:/importedFromObject.kt
CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.Foo
CONSTRUCTOR visibility:private <> () returnType:test.Foo [primary]
@@ -1,4 +1,4 @@
FILE fqName:test fileName:/callableReferenceToImportedFromObject.kt
FILE fqName:test fileName:/importedFromObject.kt
CLASS OBJECT name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.Foo
CONSTRUCTOR visibility:private <> () returnType:test.Foo [primary]
@@ -1,4 +1,4 @@
FILE fqName:<root> fileName:/callableReferenceTypeArguments.kt
FILE fqName:<root> fileName:/typeArguments.kt
CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host
CONSTRUCTOR visibility:private <> () returnType:<root>.Host [primary]
@@ -1,4 +1,4 @@
FILE fqName:<root> fileName:/callableReferenceTypeArguments.kt
FILE fqName:<root> fileName:/typeArguments.kt
CLASS OBJECT name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host
CONSTRUCTOR visibility:private <> () returnType:<root>.Host [primary]
@@ -1,4 +1,4 @@
FILE fqName:<root> fileName:/callableReferenceWithArgumentsConversion.kt
FILE fqName:<root> fileName:/withAdaptedArguments.kt
FUN name:use visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.String>
BLOCK_BODY
@@ -1,4 +1,4 @@
FILE fqName:<root> fileName:/callableReferenceWithArgumentsConversion.kt
FILE fqName:<root> fileName:/withAdaptedArguments.kt
FUN name:use visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.String>) returnType:kotlin.String
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.String>
BLOCK_BODY
@@ -1,4 +1,4 @@
FILE fqName:<root> fileName:/callableReferenceWithVarargViewedAsArray.kt
FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
FUN name:sum visibility:public modality:FINAL <> (args:kotlin.IntArray) returnType:kotlin.Int
VALUE_PARAMETER name:args index:0 type:kotlin.IntArray
BLOCK_BODY
@@ -1,4 +1,4 @@
FILE fqName:<root> fileName:/callableReferenceWithVarargViewedAsArray.kt
FILE fqName:<root> fileName:/withVarargViewedAsArray.kt
FUN name:sum visibility:public modality:FINAL <> (args:kotlin.IntArray) returnType:kotlin.Int
VALUE_PARAMETER name:args index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg]
BLOCK_BODY
@@ -786,31 +786,6 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
runTest("compiler/testData/ir/irText/expressions/callWithReorderedArguments.kt");
}
@TestMetadata("callableRefToGenericMember.kt")
public void testCallableRefToGenericMember() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableRefToGenericMember.kt");
}
@TestMetadata("callableReferenceToImportedFromObject.kt")
public void testCallableReferenceToImportedFromObject() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferenceToImportedFromObject.kt");
}
@TestMetadata("callableReferenceTypeArguments.kt")
public void testCallableReferenceTypeArguments() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferenceTypeArguments.kt");
}
@TestMetadata("callableReferenceWithArgumentsConversion.kt")
public void testCallableReferenceWithArgumentsConversion() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferenceWithArgumentsConversion.kt");
}
@TestMetadata("callableReferenceWithVarargViewedAsArray.kt")
public void testCallableReferenceWithVarargViewedAsArray() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferenceWithVarargViewedAsArray.kt");
}
@TestMetadata("calls.kt")
public void testCalls() throws Exception {
runTest("compiler/testData/ir/irText/expressions/calls.kt");
@@ -1361,6 +1336,44 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
runTest("compiler/testData/ir/irText/expressions/whileDoWhile.kt");
}
@TestMetadata("compiler/testData/ir/irText/expressions/callableReferences")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class CallableReferences extends AbstractIrTextTestCase {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInCallableReferences() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@TestMetadata("genericMember.kt")
public void testGenericMember() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferences/genericMember.kt");
}
@TestMetadata("importedFromObject.kt")
public void testImportedFromObject() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferences/importedFromObject.kt");
}
@TestMetadata("typeArguments.kt")
public void testTypeArguments() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferences/typeArguments.kt");
}
@TestMetadata("withAdaptedArguments.kt")
public void testWithAdaptedArguments() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.kt");
}
@TestMetadata("withVarargViewedAsArray.kt")
public void testWithVarargViewedAsArray() throws Exception {
runTest("compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt");
}
}
@TestMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)