Resolve collection literal expression as special array-like function

This commit is contained in:
Mikhail Zarechenskiy
2017-03-20 03:25:37 +03:00
parent d3fd96ceed
commit c85f6e7d0e
14 changed files with 175 additions and 12 deletions
@@ -3332,6 +3332,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
}
}
@TestMetadata("compiler/testData/diagnostics/tests/collectionLiterals")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class CollectionLiterals extends AbstractDiagnosticsTest {
public void testAllFilesPresentInCollectionLiterals() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/collectionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("basicCollectionLiterals.kt")
public void testBasicCollectionLiterals() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt");
doTest(fileName);
}
@TestMetadata("collectionLiteralsAsPrimitiveArrays.kt")
public void testCollectionLiteralsAsPrimitiveArrays() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsAsPrimitiveArrays.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/tests/constructorConsistency")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)