Minor. Split BytecodeText tests about special builtin bridges
This commit is contained in:
@@ -97,12 +97,9 @@ fun foo(
|
||||
c.contains("")
|
||||
}
|
||||
|
||||
// 0 signature \(TQ;\)Z
|
||||
// 0 signature \(TW;\)Z
|
||||
// 0 signature \(TR;\)Z
|
||||
// 6 signature \(Ljava/util/Collection<\+Ljava/lang/Object;>;\)Z
|
||||
// 4 public final bridge contains\(Ljava/lang/Object;\)Z
|
||||
// 3 INVOKEVIRTUAL A[0-9]\.contains \(Ljava/lang/String;\)Z
|
||||
/*
|
||||
* Calls to a1-a7, i1-i2, c in foo
|
||||
*/
|
||||
// 7 INVOKEVIRTUAL A[0-9]\.contains \(Ljava/lang/Object;\)Z
|
||||
// 1 INVOKEVIRTUAL A7\.contains \(I\)Z
|
||||
// 1 INVOKEINTERFACE java/util/Collection.contains \(Ljava/lang/Object;\)Z
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
abstract class A7 : MutableCollection<Int> {
|
||||
override fun contains(o: Int): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
// 1 public final bridge contains\(Ljava/lang/Object;\)Z
|
||||
// 1 public final bridge remove\(Ljava/lang/Object;\)Z
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
abstract class A3<W> : java.util.AbstractList<W>()
|
||||
abstract class A4<W> : java.util.AbstractList<W>() {
|
||||
override fun contains(o: W): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
|
||||
override fun containsAll(c: Collection<W>): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
abstract class A5 : java.util.AbstractList<String>()
|
||||
abstract class A6 : java.util.AbstractList<String>() {
|
||||
override fun contains(o: String): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
|
||||
override fun containsAll(c: Collection<String>): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
// 0 signature \(TW;\)Z
|
||||
// 2 signature \(Ljava/util/Collection<\+Ljava/lang/Object;>;\)Z
|
||||
// 2 public final bridge contains\(Ljava/lang/Object;\)Z
|
||||
// 2 public final bridge remove\(Ljava/lang/Object;\)Z
|
||||
// 2 public final bridge indexOf\(Ljava/lang/Object;\)I
|
||||
// 2 public final bridge lastIndexOf\(Ljava/lang/Object;\)I
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
abstract class A1<Q> : MutableCollection<Q> {
|
||||
override fun contains(o: Q): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
|
||||
override fun containsAll(c: Collection<Q>): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
abstract class A2 : MutableCollection<String> {
|
||||
override fun contains(o: String): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
|
||||
override fun containsAll(c: Collection<String>): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
// 0 signature \(TQ;\)Z
|
||||
// 2 signature \(Ljava/util/Collection<\+Ljava/lang/Object;>;\)Z
|
||||
// 1 public final bridge contains\(Ljava/lang/Object;\)Z
|
||||
// 1 public final bridge remove\(Ljava/lang/Object;\)Z
|
||||
// 1 INVOKEVIRTUAL A[0-9]\.contains \(Ljava/lang/String;\)Z
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
interface I1<R> : MutableSet<R> {
|
||||
override fun contains(o: R): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
|
||||
override fun containsAll(c: Collection<R>): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
interface I2 : MutableSet<String> {
|
||||
override fun contains(o: String): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
|
||||
override fun containsAll(c: Collection<String>): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
abstract class A : I2
|
||||
|
||||
// 1 public final bridge contains\(Ljava/lang/Object;\)Z
|
||||
// 1 public final bridge remove\(Ljava/lang/Object;\)Z
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
abstract class A8 : MutableCollection<Any?> {
|
||||
override fun contains(o: Any?): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
// 1 bridge
|
||||
// 1 public final bridge size
|
||||
@@ -402,6 +402,45 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/size.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class GenericParameterBridge extends AbstractBytecodeTextTest {
|
||||
@TestMetadata("abstractList.kt")
|
||||
public void testAbstractList() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/abstractList.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInGenericParameterBridge() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("IntMC.kt")
|
||||
public void testIntMC() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/IntMC.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("mutableCollection.kt")
|
||||
public void testMutableCollection() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/mutableCollection.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("mutableSetInterfaces.kt")
|
||||
public void testMutableSetInterfaces() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/mutableSetInterfaces.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nullableAnyMC.kt")
|
||||
public void testNullableAnyMC() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/nullableAnyMC.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeText/conditions")
|
||||
|
||||
Reference in New Issue
Block a user