Merge K2 bytecodeListing tests to main bytecodeListing tests

This commit is contained in:
Alexander Udalov
2023-03-22 23:09:44 +01:00
committed by Space Team
parent 68dd89c593
commit 14c2030595
11 changed files with 125 additions and 150 deletions
@@ -1,11 +0,0 @@
// MODULE: lib
// FILE: 1.kt
interface I {
fun foo(x: (suspend () -> Unit)?): (suspend () -> Unit)?
}
// MODULE: main(lib)
// FILE: 2.kt
class C : I {
override fun foo(x: (suspend () -> Unit)?) = x
}
@@ -1,13 +0,0 @@
Module: lib
@kotlin.Metadata
public interface I {
// source: '1.kt'
public abstract @org.jetbrains.annotations.Nullable method foo(@org.jetbrains.annotations.Nullable p0: kotlin.jvm.functions.Function1): kotlin.jvm.functions.Function1
}
Module: main
@kotlin.Metadata
public final class C {
// source: '2.kt'
public method <init>(): void
public @org.jetbrains.annotations.Nullable method foo(@org.jetbrains.annotations.Nullable p0: kotlin.jvm.functions.Function1): kotlin.jvm.functions.Function1
}
@@ -1,13 +0,0 @@
// MODULE: ModuleA
// FILE: AI.kt
public interface AI {
val number: Number
}
// FILE: AC.kt
public class AC : AI {
final override val number: Number
field = 4
}
@@ -1,13 +0,0 @@
@kotlin.Metadata
public final class AC {
// source: 'AC.kt'
private final field number: int
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getNumber(): java.lang.Number
}
@kotlin.Metadata
public interface AI {
// source: 'AI.kt'
public abstract @org.jetbrains.annotations.NotNull method getNumber(): java.lang.Number
}
@@ -2153,6 +2153,38 @@ public class FirLightTreeBytecodeListingTestGenerated extends AbstractFirLightTr
public void testSamAdapterForJavaInterfaceWithNullability() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/nullabilityAnnotations/samAdapterForJavaInterfaceWithNullability.kt");
}
@Test
@TestMetadata("suspendFunction.kt")
public void testSuspendFunction() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/nullabilityAnnotations/suspendFunction.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/bytecodeListing/properties")
@TestDataPath("$PROJECT_ROOT")
public class Properties {
@Test
public void testAllFilesPresentInProperties() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/bytecodeListing/properties/backingField")
@TestDataPath("$PROJECT_ROOT")
public class BackingField {
@Test
public void testAllFilesPresentInBackingField() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/properties/backingField"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("explicitBackingFieldsInJava.kt")
public void testExplicitBackingFieldsInJava() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/properties/backingField/explicitBackingFieldsInJava.kt");
}
}
}
@Nested
@@ -1,69 +0,0 @@
/*
* Copyright 2010-2023 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.test.runners.codegen;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.test.generators.GenerateCompilerTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/fir/fir2ir/testData/codegen/bytecodeListing")
@TestDataPath("$PROJECT_ROOT")
public class FirLightTreeSpecificBytecodeListingTestGenerated extends AbstractFirLightTreeBytecodeListingTest {
@Test
public void testAllFilesPresentInBytecodeListing() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/fir/fir2ir/testData/codegen/bytecodeListing/nullabilityAnnotations")
@TestDataPath("$PROJECT_ROOT")
public class NullabilityAnnotations {
@Test
public void testAllFilesPresentInNullabilityAnnotations() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/codegen/bytecodeListing/nullabilityAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("suspendFunction.kt")
public void testSuspendFunction() throws Exception {
runTest("compiler/fir/fir2ir/testData/codegen/bytecodeListing/nullabilityAnnotations/suspendFunction.kt");
}
}
@Nested
@TestMetadata("compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties")
@TestDataPath("$PROJECT_ROOT")
public class Properties {
@Test
public void testAllFilesPresentInProperties() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties/backingField")
@TestDataPath("$PROJECT_ROOT")
public class BackingField {
@Test
public void testAllFilesPresentInBackingField() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties/backingField"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("explicitBackingFieldsInJava.kt")
public void testExplicitBackingFieldsInJava() throws Exception {
runTest("compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties/backingField/explicitBackingFieldsInJava.kt");
}
}
}
}
@@ -2153,6 +2153,38 @@ public class FirPsiBytecodeListingTestGenerated extends AbstractFirPsiBytecodeLi
public void testSamAdapterForJavaInterfaceWithNullability() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/nullabilityAnnotations/samAdapterForJavaInterfaceWithNullability.kt");
}
@Test
@TestMetadata("suspendFunction.kt")
public void testSuspendFunction() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/nullabilityAnnotations/suspendFunction.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/bytecodeListing/properties")
@TestDataPath("$PROJECT_ROOT")
public class Properties {
@Test
public void testAllFilesPresentInProperties() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/bytecodeListing/properties/backingField")
@TestDataPath("$PROJECT_ROOT")
public class BackingField {
@Test
public void testAllFilesPresentInBackingField() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/properties/backingField"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("explicitBackingFieldsInJava.kt")
public void testExplicitBackingFieldsInJava() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/properties/backingField/explicitBackingFieldsInJava.kt");
}
}
}
@Nested
@@ -1,69 +0,0 @@
/*
* Copyright 2010-2023 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.test.runners.codegen;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.test.generators.GenerateCompilerTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/fir/fir2ir/testData/codegen/bytecodeListing")
@TestDataPath("$PROJECT_ROOT")
public class FirPsiSpecificBytecodeListingTestGenerated extends AbstractFirPsiBytecodeListingTest {
@Test
public void testAllFilesPresentInBytecodeListing() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/fir/fir2ir/testData/codegen/bytecodeListing/nullabilityAnnotations")
@TestDataPath("$PROJECT_ROOT")
public class NullabilityAnnotations {
@Test
public void testAllFilesPresentInNullabilityAnnotations() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/codegen/bytecodeListing/nullabilityAnnotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("suspendFunction.kt")
public void testSuspendFunction() throws Exception {
runTest("compiler/fir/fir2ir/testData/codegen/bytecodeListing/nullabilityAnnotations/suspendFunction.kt");
}
}
@Nested
@TestMetadata("compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties")
@TestDataPath("$PROJECT_ROOT")
public class Properties {
@Test
public void testAllFilesPresentInProperties() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties/backingField")
@TestDataPath("$PROJECT_ROOT")
public class BackingField {
@Test
public void testAllFilesPresentInBackingField() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties/backingField"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("explicitBackingFieldsInJava.kt")
public void testExplicitBackingFieldsInJava() throws Exception {
runTest("compiler/fir/fir2ir/testData/codegen/bytecodeListing/properties/backingField/explicitBackingFieldsInJava.kt");
}
}
}
}