Optimize method count for collection stubs

Do not generate stubs if they're already present in superclasses

 #KT-13698 In Progress
This commit is contained in:
Denis Zharkov
2016-10-05 15:52:48 +03:00
parent 900c442efd
commit e05e0ec921
13 changed files with 414 additions and 25 deletions
@@ -3586,6 +3586,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("noStubsInJavaSuperClass.kt")
public void testNoStubsInJavaSuperClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/noStubsInJavaSuperClass.kt");
doTest(fileName);
}
@TestMetadata("platformValueContains.kt")
public void testPlatformValueContains() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/platformValueContains.kt");
@@ -140,6 +140,33 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/collectionStubs")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class CollectionStubs extends AbstractBytecodeListingTest {
public void testAllFilesPresentInCollectionStubs() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/collectionStubs"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("noStubsInJavaSuperClass.kt")
public void testNoStubsInJavaSuperClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.kt");
doTest(fileName);
}
@TestMetadata("stubsFromSuperclass.kt")
public void testStubsFromSuperclass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.kt");
doTest(fileName);
}
@TestMetadata("stubsFromSuperclassNoBridges.kt")
public void testStubsFromSuperclassNoBridges() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclassNoBridges.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)