JVM_IR. Add IrAsmLikeInstructionListingTestGenerated tests
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
fun String.foo(count: Int) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
fun String.foo(count: Int) {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +NewCapturedReceiverFieldNamingConvention
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
fun String.foo(count: Int) {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: -NewCapturedReceiverFieldNamingConvention
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
fun String.foo(count: Int) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: +NewCapturedReceiverFieldNamingConvention
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
fun String.foo(count: Int) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: -NewCapturedReceiverFieldNamingConvention
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
fun String.foo(count: Int) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
class Foo {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
fun String.foo(count: Int) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
fun foo() {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
fun foo() {
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
fun String.foo(count: Int) {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// !LANGUAGE: -NewCapturedReceiverFieldNamingConvention
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// LOCAL_VARIABLE_TABLE
|
||||
|
||||
fun String.foo(count: Int) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// KOTLIN_CONFIGURATION_FLAGS: +JVM.EMIT_JVM_TYPE_ANNOTATIONS
|
||||
// TYPE_ANNOTATIONS
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// KOTLIN_CONFIGURATION_FLAGS: +JVM.EMIT_JVM_TYPE_ANNOTATIONS
|
||||
// TYPE_ANNOTATIONS
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// KOTLIN_CONFIGURATION_FLAGS: +JVM.EMIT_JVM_TYPE_ANNOTATIONS
|
||||
// TYPE_ANNOTATIONS
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
+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.AbstractAsmLikeInstructionListingTest
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
|
||||
abstract class AbstractIrAsmLikeInstructionListingTest : AbstractAsmLikeInstructionListingTest() {
|
||||
override fun getBackend() = TargetBackend.JVM_IR
|
||||
}
|
||||
Generated
+202
@@ -0,0 +1,202 @@
|
||||
/*
|
||||
* 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/asmLike")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class IrAsmLikeInstructionListingTestGenerated extends AbstractIrAsmLikeInstructionListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInAsmLike() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/asmLike"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/asmLike/receiverMangling")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class ReceiverMangling extends AbstractIrAsmLikeInstructionListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInReceiverMangling() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/asmLike/receiverMangling"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("deepInline.kt")
|
||||
public void testDeepInline() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/deepInline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("deepInlineWithLabels.kt")
|
||||
public void testDeepInlineWithLabels() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/deepInlineWithLabels.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("deepNoinlineWithLabels_after.kt")
|
||||
public void testDeepNoinlineWithLabels_after() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("deepNoinlineWithLabels_before.kt")
|
||||
public void testDeepNoinlineWithLabels_before() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/deepNoinlineWithLabels_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("deepNoinline_after.kt")
|
||||
public void testDeepNoinline_after() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("deepNoinline_before.kt")
|
||||
public void testDeepNoinline_before() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/deepNoinline_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineClassCapture.kt")
|
||||
public void testInlineClassCapture() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/inlineClassCapture.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineReceivers.kt")
|
||||
public void testInlineReceivers() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/inlineReceivers.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("innerClass.kt")
|
||||
public void testInnerClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/innerClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("localFunctions.kt")
|
||||
public void testLocalFunctions() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/localFunctions.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("mangledNames.kt")
|
||||
public void testMangledNames() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/mangledNames.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nonInlineReceivers_after.kt")
|
||||
public void testNonInlineReceivers_after() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/nonInlineReceivers_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nonInlineReceivers_before.kt")
|
||||
public void testNonInlineReceivers_before() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/nonInlineReceivers_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/receiverMangling/simple.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/asmLike/typeAnnotations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class TypeAnnotations extends AbstractIrAsmLikeInstructionListingTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInTypeAnnotations() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/asmLike/typeAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("complex.kt")
|
||||
public void testComplex() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/complex.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constructor.kt")
|
||||
public void testConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/constructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("defaultArgs.kt")
|
||||
public void testDefaultArgs() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/defaultArgs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enumClassConstructor.kt")
|
||||
public void testEnumClassConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/enumClassConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("extension.kt")
|
||||
public void testExtension() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/extension.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("implicit.kt")
|
||||
public void testImplicit() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/implicit.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("innerClassConstructor.kt")
|
||||
public void testInnerClassConstructor() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/innerClassConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmOverload.kt")
|
||||
public void testJvmOverload() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/jvmOverload.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jvmStatic.kt")
|
||||
public void testJvmStatic() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/jvmStatic.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("notYetSupported.kt")
|
||||
public void testNotYetSupported() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/notYetSupported.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("property.kt")
|
||||
public void testProperty() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/property.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/simple.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simple2Params.kt")
|
||||
public void testSimple2Params() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/simple2Params.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("staticNested.kt")
|
||||
public void testStaticNested() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/staticNested.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("syntheticAccessors.kt")
|
||||
public void testSyntheticAccessors() throws Exception {
|
||||
runTest("compiler/testData/codegen/asmLike/typeAnnotations/syntheticAccessors.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -488,6 +488,10 @@ fun main(args: Array<String>) {
|
||||
testClass<AbstractIrBytecodeTextTest> {
|
||||
model("codegen/bytecodeText", targetBackend = TargetBackend.JVM_IR, excludeDirs = listOf("oldLanguageVersions"))
|
||||
}
|
||||
|
||||
testClass<AbstractIrAsmLikeInstructionListingTest> {
|
||||
model("codegen/asmLike", targetBackend = TargetBackend.JVM_IR)
|
||||
}
|
||||
}
|
||||
|
||||
testGroup(
|
||||
|
||||
Reference in New Issue
Block a user