Add IR equivalent of AbstractBytecodeListingTest and muted failures.
This commit is contained in:
committed by
Dmitry Petrov
parent
06b6477d04
commit
b782e8f0f0
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Example {
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Foo {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
@Target(AnnotationTarget.FIELD)
|
||||
annotation class Anno
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
annotation class Ann
|
||||
|
||||
@Ann open class My
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
annotation class ClsAnn
|
||||
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
annotation class Simple(val value: String)
|
||||
|
||||
fun localCaptured(): Any {
|
||||
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
class Foo private constructor(s: String) {
|
||||
|
||||
private fun foo(s: String) {}
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
annotation class Ann
|
||||
|
||||
class Foo private @Ann constructor(@Ann s: String) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
class A {
|
||||
val a = ""
|
||||
fun b() = ""
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
// FILE: test/B.java
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
open class A<T> : Collection<T> {
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
open class A<T> : Collection<T> {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +ProperVisibilityForCompanionObjectInstanceField
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
open class TestProtectedCompanionInClass {
|
||||
protected companion object
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: -ProperVisibilityForCompanionObjectInstanceField
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
open class TestProtectedCompanionInClass {
|
||||
protected companion object
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
open class TestProtectedCompanionInClass {
|
||||
protected companion object
|
||||
}
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// COMMON_COROUTINES_TEST
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// COMMON_COROUTINES_TEST
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_COROUTINES
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// COMMON_COROUTINES_TEST
|
||||
import COROUTINES_PACKAGE.*
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
private suspend fun foo() {}
|
||||
|
||||
class A {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
interface A
|
||||
|
||||
interface B {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
@file:[JvmName("Foo") JvmMultifileClass]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
interface ImmutableCollection<out E> : Collection<E> {
|
||||
fun add(element: @UnsafeVariance E): ImmutableCollection<E>
|
||||
fun addAll(elements: Collection<@UnsafeVariance E>): ImmutableCollection<E>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
@file:[JvmName("Foo") JvmMultifileClass]
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
@file:[JvmName("Foo") JvmMultifileClass]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
@file:[JvmName("Foo") JvmMultifileClass]
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
@file:[JvmName("Foo") JvmMultifileClass]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +UseGetterNameForPropertyAnnotationsMethodOnJvm
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
inline fun <T> bar() { }
|
||||
|
||||
inline fun <U, reified V> baz() {}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
inline val <reified Z> Z.extProp: String
|
||||
get() = "123"
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
suspend inline fun simple() {}
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
annotation class Ann
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Foo(val x: Int) {
|
||||
companion object {
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Foo(val x: Int) {
|
||||
val prop: Int get() = 1
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Test(val x: Int = 0) {
|
||||
constructor(a: Int, b: Int, c: Int = 42) : this(a + b + c)
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Z(val x: Int) {
|
||||
constructor(x: Long) : this(x.toInt())
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Z(val x: Int)
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Z1(val x: Int)
|
||||
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses +UseGetterNameForPropertyAnnotationsMethodOnJvm
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
interface IFoo {
|
||||
fun overridingFun()
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
interface A<T> {
|
||||
fun foo(a: T)
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Z1(val x: Int)
|
||||
inline class Z2(val z: Z1)
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
interface IValue {
|
||||
val value: Int
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
|
||||
inline class Z @PublishedApi internal constructor(val value: Int)
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class Foo(val l: Long) {
|
||||
fun empty() {}
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
annotation class StringRes
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
@file:JvmMultifileClass
|
||||
@file:JvmName("Foo")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun main() {}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
suspend fun main(args: Array<String>) {}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: -ExtendedMainConvention -ReleaseCoroutines
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
// uses kotlin.coroutines.experimental classes under the hood
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
interface A {
|
||||
// There must be no delegation methods for 'log' and 'bar' in C as they are private
|
||||
private val log: String get() = "O"
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
class A {
|
||||
fun foo() {}
|
||||
val bar = 42
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
abstract class A<T> : List<T>
|
||||
abstract class B : List<Int>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// FILE: test/JavaClass.java
|
||||
package test;
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
open class Test {
|
||||
var publicProperty: String = ""
|
||||
private set
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
package test
|
||||
|
||||
inline fun <reified T> makeRunnable(noinline lambda: ()->Unit) : Runnable {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
abstract class A1<Q> : MutableCollection<Q> {
|
||||
override fun contains(o: Q): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
|
||||
Vendored
+1
@@ -1,2 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
abstract class A<T> : List<T>
|
||||
abstract class B<E> : A<E>()
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
open class A1 {
|
||||
open val size: Int = 56
|
||||
}
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
open class A0<E> : MutableList<E> {
|
||||
override fun add(element: E): Boolean {
|
||||
throw UnsupportedOperationException()
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_SIGNATURES
|
||||
|
||||
class GenericMap<K, V> : MutableMap<K, V> by HashMap<K, V>()
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_SIGNATURES
|
||||
|
||||
class StringStringMap : MutableMap<String, String> by HashMap<String, String>()
|
||||
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_SIGNATURES
|
||||
|
||||
class StringMap<V> : MutableMap<String, V> by HashMap<String, V>()
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.codegen.ir
|
||||
|
||||
import org.jetbrains.kotlin.codegen.AbstractBytecodeListingTest
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
|
||||
abstract class AbstractIrBytecodeListingTest : AbstractBytecodeListingTest() {
|
||||
override fun getBackend() = TargetBackend.JVM_IR
|
||||
}
|
||||
+512
@@ -0,0 +1,512 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.codegen.ir;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInBytecodeListing() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("callableNameIntrinsic.kt")
|
||||
public void testCallableNameIntrinsic() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectVisibility_after.kt")
|
||||
public void testCompanionObjectVisibility_after() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/companionObjectVisibility_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectVisibility_before.kt")
|
||||
public void testCompanionObjectVisibility_before() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/companionObjectVisibility_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectVisibility_lv13.kt")
|
||||
public void testCompanionObjectVisibility_lv13() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/companionObjectVisibility_lv13.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultImpls.kt")
|
||||
public void testDefaultImpls() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/defaultImpls.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyMultifileFacade.kt")
|
||||
public void testEmptyMultifileFacade() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("immutableCollection.kt")
|
||||
public void testImmutableCollection() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/immutableCollection.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmOverloadsAndParametersAnnotations.kt")
|
||||
public void testJvmOverloadsAndParametersAnnotations() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noCollectionStubMethodsInInterface.kt")
|
||||
public void testNoCollectionStubMethodsInInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/noCollectionStubMethodsInInterface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noDelegationsToPrivateInterfaceMembers.kt")
|
||||
public void testNoDelegationsToPrivateInterfaceMembers() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/noDelegationsToPrivateInterfaceMembers.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noReceiverInCallableReferenceClasses.kt")
|
||||
public void testNoReceiverInCallableReferenceClasses() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noRemoveAtInReadOnly.kt")
|
||||
public void testNoRemoveAtInReadOnly() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/noRemoveAtInReadOnly.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noToArrayInJava.kt")
|
||||
public void testNoToArrayInJava() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/noToArrayInJava.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("platformTypes.kt")
|
||||
public void testPlatformTypes() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/platformTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("privateDefaultSetter.kt")
|
||||
public void testPrivateDefaultSetter() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/privateDefaultSetter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("samAdapterAndInlinedOne.kt")
|
||||
public void testSamAdapterAndInlinedOne() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/samAdapterAndInlinedOne.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/annotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Annotations extends AbstractIrBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInAnnotations() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("defaultTargets.kt")
|
||||
public void testDefaultTargets() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/defaultTargets.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("deprecatedJvmOverloads.kt")
|
||||
public void testDeprecatedJvmOverloads() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/deprecatedJvmOverloads.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("JvmSynthetic.kt")
|
||||
public void testJvmSynthetic() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/JvmSynthetic.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt27895.kt")
|
||||
public void testKt27895() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/kt27895.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt9320.kt")
|
||||
public void testKt9320() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/kt9320.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("literals.kt")
|
||||
public void testLiterals() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/literals.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localClassWithCapturedParams.kt")
|
||||
public void testLocalClassWithCapturedParams() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/localClassWithCapturedParams.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noAdditionalAnnotationsInAccessors.kt")
|
||||
public void testNoAdditionalAnnotationsInAccessors() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/noAdditionalAnnotationsInAccessors.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noAnnotationsInSyntheticAccessors.kt")
|
||||
public void testNoAnnotationsInSyntheticAccessors() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/noAnnotationsInSyntheticAccessors.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("onProperties.kt")
|
||||
public void testOnProperties() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/onProperties.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("onReceiver.kt")
|
||||
public void testOnReceiver() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/annotations/onReceiver.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/collectionStubs")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class CollectionStubs extends AbstractIrBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCollectionStubs() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/collectionStubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsInJavaSuperClass.kt")
|
||||
public void testNoStubsInJavaSuperClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stubsFromSuperclass.kt")
|
||||
public void testStubsFromSuperclass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stubsFromSuperclassNoBridges.kt")
|
||||
public void testStubsFromSuperclassNoBridges() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclassNoBridges.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/coroutines")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Coroutines extends AbstractIrBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
private void runTestWithPackageReplacement(String testDataFilePath, String packageName) throws Exception {
|
||||
KotlinTestUtils.runTest(filePath -> doTestWithCoroutinesPackageReplacement(filePath, packageName), TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInCoroutines() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/coroutines"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("coroutineContextIntrinsic.kt")
|
||||
public void testCoroutineContextIntrinsic_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/coroutineContextIntrinsic.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("coroutineFields.kt")
|
||||
public void testCoroutineFields_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/coroutineFields.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("oomInReturnUnit.kt")
|
||||
public void testOomInReturnUnit_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/oomInReturnUnit.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("privateAccessor.kt")
|
||||
public void testPrivateAccessor_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/privateAccessor.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("privateSuspendFun.kt")
|
||||
public void testPrivateSuspendFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/coroutines/privateSuspendFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("suspendReifiedFun.kt")
|
||||
public void testSuspendReifiedFun_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/suspendReifiedFun.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("tcoContinuation.kt")
|
||||
public void testTcoContinuation_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/coroutines/tcoContinuation.kt", "kotlin.coroutines");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/inline")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Inline extends AbstractIrBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInInline() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/inline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineOnly.kt")
|
||||
public void testInlineOnly() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inline/inlineOnly.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InlineOnlyMultifile.kt")
|
||||
public void testInlineOnlyMultifile() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inline/InlineOnlyMultifile.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineOnlyProperty.kt")
|
||||
public void testInlineOnlyProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inline/inlineOnlyProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InlineOnlyPropertyMultifile.kt")
|
||||
public void testInlineOnlyPropertyMultifile() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inline/InlineOnlyPropertyMultifile.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineReified.kt")
|
||||
public void testInlineReified() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inline/inlineReified.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InlineReifiedMultifile.kt")
|
||||
public void testInlineReifiedMultifile() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inline/InlineReifiedMultifile.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineReifiedProperty.kt")
|
||||
public void testInlineReifiedProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inline/inlineReifiedProperty.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InlineReifiedPropertyMultifile.kt")
|
||||
public void testInlineReifiedPropertyMultifile() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inline/InlineReifiedPropertyMultifile.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleNamed.kt")
|
||||
public void testSimpleNamed() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inline/simpleNamed.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class InlineClasses extends AbstractIrBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInInlineClasses() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("annotationsOnHiddenConstructor.kt")
|
||||
public void testAnnotationsOnHiddenConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/annotationsOnHiddenConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("companionObjectInsideInlineClass.kt")
|
||||
public void testCompanionObjectInsideInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/companionObjectInsideInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("computablePropertiesInsideInlineClass.kt")
|
||||
public void testComputablePropertiesInsideInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/computablePropertiesInsideInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constructorsWithDefaultParameterValues.kt")
|
||||
public void testConstructorsWithDefaultParameterValues() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/constructorsWithDefaultParameterValues.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassMembersVisibility.kt")
|
||||
public void testInlineClassMembersVisibility() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassMembersVisibility.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassTypeParametersInConstructor.kt")
|
||||
public void testInlineClassTypeParametersInConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassTypeParametersInConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassWithInlineClassUnderlyingType.kt")
|
||||
public void testInlineClassWithInlineClassUnderlyingType() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithInlineClassUnderlyingType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassWithManyKindsOfMembers.kt")
|
||||
public void testInlineClassWithManyKindsOfMembers() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/inlineClassWithManyKindsOfMembers.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noBridgesForErasedInlineClass.kt")
|
||||
public void testNoBridgesForErasedInlineClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/noBridgesForErasedInlineClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nullabilityInExpansion.kt")
|
||||
public void testNullabilityInExpansion() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/nullabilityInExpansion.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("primaryValsWithDifferentVisibilities.kt")
|
||||
public void testPrimaryValsWithDifferentVisibilities() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/primaryValsWithDifferentVisibilities.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("publishedApiAnnotationOnInlineClassConstructor.kt")
|
||||
public void testPublishedApiAnnotationOnInlineClassConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/publishedApiAnnotationOnInlineClassConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("shapeOfInlineClassWithPrimitive.kt")
|
||||
public void testShapeOfInlineClassWithPrimitive() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/shapeOfInlineClassWithPrimitive.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/main")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Main extends AbstractIrBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInMain() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/main"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("multifileSuspend.kt")
|
||||
public void testMultifileSuspend() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/main/multifileSuspend.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterlessMain.kt")
|
||||
public void testParameterlessMain() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/main/parameterlessMain.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("parameterlessMain_before.kt")
|
||||
public void testParameterlessMain_before() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/main/parameterlessMain_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("suspendMain.kt")
|
||||
public void testSuspendMain() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/main/suspendMain.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("suspendMain_before.kt")
|
||||
public void testSuspendMain_before() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/main/suspendMain_before.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/multiplatform")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Multiplatform extends AbstractIrBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInMultiplatform() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("optionalExpectation.kt")
|
||||
public void testOptionalExpectation() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/multiplatform/optionalExpectation.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class SpecialBridges extends AbstractIrBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSpecialBridges() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/specialBridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("contains.kt")
|
||||
public void testContains() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noSpecialBridgeIfPresentInSuperClass.kt")
|
||||
public void testNoSpecialBridgeIfPresentInSuperClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/noSpecialBridgeIfPresentInSuperClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("redundantStubForSize.kt")
|
||||
public void testRedundantStubForSize() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("removeAtTwoSpecialBridges.kt")
|
||||
public void testRemoveAtTwoSpecialBridges() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/removeAtTwoSpecialBridges.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/signatures")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Signatures extends AbstractIrBytecodeListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSignatures() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/specialBridges/signatures"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("genericClass.kt")
|
||||
public void testGenericClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/signatures/genericClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nonGenericClass.kt")
|
||||
public void testNonGenericClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/signatures/nonGenericClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("partiallySpecializedClass.kt")
|
||||
public void testPartiallySpecializedClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -437,6 +437,10 @@ fun main(args: Array<String>) {
|
||||
model("compileKotlinAgainstKotlin", targetBackend = TargetBackend.JVM_IR)
|
||||
}
|
||||
|
||||
testClass<AbstractIrBytecodeListingTest> {
|
||||
model("codegen/bytecodeListing", targetBackend = TargetBackend.JVM_IR)
|
||||
}
|
||||
|
||||
testClass<AbstractIrCheckLocalVariablesTableTest> {
|
||||
model("checkLocalVariablesTable", targetBackend = TargetBackend.JVM_IR)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user