diff --git a/compiler/testData/cli/jvm/firAllOpenPlugin.args b/compiler/testData/cli/jvm/firAllOpenPlugin.args new file mode 100644 index 00000000000..2433ebe27e9 --- /dev/null +++ b/compiler/testData/cli/jvm/firAllOpenPlugin.args @@ -0,0 +1,6 @@ +-d +$TEMP_DIR$ +-Xplugin=dist/kotlinc/lib/allopen-compiler-plugin.jar +-P +plugin\:org.jetbrains.kotlin.allopen\:annotation=foo.AllOpen +$TESTDATA_DIR$/firAllOpenPlugin.kt diff --git a/compiler/testData/cli/jvm/firAllOpenPlugin.kt b/compiler/testData/cli/jvm/firAllOpenPlugin.kt new file mode 100644 index 00000000000..a78806c9d09 --- /dev/null +++ b/compiler/testData/cli/jvm/firAllOpenPlugin.kt @@ -0,0 +1,14 @@ +package foo + +annotation class AllOpen + +@AllOpen +class Base { + fun method() {} + val property = "hello" +} + +class Derived : Base() { + override fun method() {} + override val property = "world" +} diff --git a/compiler/testData/cli/jvm/firAllOpenPlugin.out b/compiler/testData/cli/jvm/firAllOpenPlugin.out new file mode 100644 index 00000000000..d86bac9de59 --- /dev/null +++ b/compiler/testData/cli/jvm/firAllOpenPlugin.out @@ -0,0 +1 @@ +OK diff --git a/compiler/tests-gen/org/jetbrains/kotlin/cli/CliTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/cli/CliTestGenerated.java index 00a96c39773..0495c9c47c7 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/cli/CliTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/cli/CliTestGenerated.java @@ -369,6 +369,11 @@ public class CliTestGenerated extends AbstractCliTest { runTest("compiler/testData/cli/jvm/fileClassClashMultipleFiles.args"); } + @TestMetadata("firAllOpenPlugin.args") + public void testFirAllOpenPlugin() throws Exception { + runTest("compiler/testData/cli/jvm/firAllOpenPlugin.args"); + } + @TestMetadata("firDfa.args") public void testFirDfa() throws Exception { runTest("compiler/testData/cli/jvm/firDfa.args"); diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index d20e50f9f78..9a3256eff90 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -6,6 +6,7 @@ package org.jetbrains.kotlin.generators.tests import org.jetbrains.kotlin.allopen.AbstractBytecodeListingTestForAllOpen +import org.jetbrains.kotlin.allopen.AbstractFirBytecodeListingTestForAllOpen import org.jetbrains.kotlin.allopen.AbstractIrBytecodeListingTestForAllOpen import org.jetbrains.kotlin.android.parcel.AbstractParcelBoxTest import org.jetbrains.kotlin.android.parcel.AbstractParcelBytecodeListingTest @@ -408,6 +409,9 @@ fun main(args: Array) { testClass { model("bytecodeListing", excludedPattern = excludedFirTestdataPattern) } + testClass { + model("bytecodeListing", excludedPattern = excludedFirTestdataPattern) + } } } diff --git a/plugins/allopen/allopen-cli/build.gradle.kts b/plugins/allopen/allopen-cli/build.gradle.kts index 54c3b9a5e55..74829005588 100644 --- a/plugins/allopen/allopen-cli/build.gradle.kts +++ b/plugins/allopen/allopen-cli/build.gradle.kts @@ -8,6 +8,14 @@ plugins { dependencies { compileOnly(project(":compiler:plugin-api")) compileOnly(project(":compiler:frontend")) + + compileOnly(project(":compiler:fir:cones")) + compileOnly(project(":compiler:fir:tree")) + compileOnly(project(":compiler:fir:resolve")) + compileOnly(project(":compiler:fir:checkers")) + compileOnly(project(":compiler:ir.backend.common")) + compileOnly(project(":compiler:fir:entrypoint")) + compileOnly(intellijCore()) runtimeOnly(kotlinStdlib()) @@ -21,6 +29,12 @@ dependencies { testApi(projectTests(":compiler:tests-common-new")) testApi(projectTests(":compiler:test-infrastructure")) testApi(projectTests(":compiler:test-infrastructure-utils")) + testApi(project(":compiler:fir:checkers")) + testRuntimeOnly(project(":compiler:fir:fir-serialization")) + + testCompileOnly(project(":kotlin-reflect-api")) + testRuntimeOnly(project(":kotlin-reflect")) + testRuntimeOnly(project(":core:descriptors.runtime")) } sourceSets { @@ -32,11 +46,8 @@ sourceSets { } runtimeJar() - sourcesJar() - javadocJar() - testsJar() projectTest(parallel = true) { diff --git a/plugins/allopen/allopen-cli/src/org/jetbrains/kotlin/allopen/AllOpenPlugin.kt b/plugins/allopen/allopen-cli/src/org/jetbrains/kotlin/allopen/AllOpenPlugin.kt index 65ca7db05aa..9ddcf9311bb 100644 --- a/plugins/allopen/allopen-cli/src/org/jetbrains/kotlin/allopen/AllOpenPlugin.kt +++ b/plugins/allopen/allopen-cli/src/org/jetbrains/kotlin/allopen/AllOpenPlugin.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2010-2022 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.allopen @@ -20,10 +9,12 @@ import com.intellij.mock.MockProject import org.jetbrains.kotlin.allopen.AllOpenCommandLineProcessor.Companion.SUPPORTED_PRESETS import org.jetbrains.kotlin.allopen.AllOpenConfigurationKeys.ANNOTATION import org.jetbrains.kotlin.allopen.AllOpenConfigurationKeys.PRESET +import org.jetbrains.kotlin.allopen.fir.FirAllOpenExtensionRegistrar import org.jetbrains.kotlin.compiler.plugin.* import org.jetbrains.kotlin.config.CompilerConfiguration import org.jetbrains.kotlin.config.CompilerConfigurationKey import org.jetbrains.kotlin.extensions.DeclarationAttributeAltererExtension +import org.jetbrains.kotlin.fir.extensions.FirExtensionRegistrar object AllOpenConfigurationKeys { val ANNOTATION: CompilerConfigurationKey> = CompilerConfigurationKey.create("annotation qualified name") @@ -85,5 +76,9 @@ class AllOpenComponentRegistrar : ComponentRegistrar { if (annotations.isEmpty()) return DeclarationAttributeAltererExtension.registerExtension(project, CliAllOpenDeclarationAttributeAltererExtension(annotations)) + FirExtensionRegistrar.registerExtension(project, FirAllOpenExtensionRegistrar(annotations)) } + + override val supportsK2: Boolean + get() = true } diff --git a/plugins/allopen/allopen-cli/src/org/jetbrains/kotlin/allopen/fir/FirAllOpenExtensionRegistrar.kt b/plugins/allopen/allopen-cli/src/org/jetbrains/kotlin/allopen/fir/FirAllOpenExtensionRegistrar.kt new file mode 100644 index 00000000000..cf53e2279ac --- /dev/null +++ b/plugins/allopen/allopen-cli/src/org/jetbrains/kotlin/allopen/fir/FirAllOpenExtensionRegistrar.kt @@ -0,0 +1,14 @@ +/* + * Copyright 2010-2022 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.allopen.fir + +import org.jetbrains.kotlin.fir.extensions.FirExtensionRegistrar + +class FirAllOpenExtensionRegistrar(val allOpenAnnotationFqNames: List) : FirExtensionRegistrar() { + override fun ExtensionRegistrarContext.configurePlugin() { + +FirAllOpenStatusTransformer.getFactory(allOpenAnnotationFqNames) + } +} diff --git a/plugins/allopen/allopen-cli/src/org/jetbrains/kotlin/allopen/fir/FirAllOpenStatusTransformer.kt b/plugins/allopen/allopen-cli/src/org/jetbrains/kotlin/allopen/fir/FirAllOpenStatusTransformer.kt new file mode 100644 index 00000000000..64ca3b29fb9 --- /dev/null +++ b/plugins/allopen/allopen-cli/src/org/jetbrains/kotlin/allopen/fir/FirAllOpenStatusTransformer.kt @@ -0,0 +1,78 @@ +/* + * Copyright 2010-2022 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.allopen.fir + +import org.jetbrains.kotlin.descriptors.ClassKind +import org.jetbrains.kotlin.descriptors.Modality +import org.jetbrains.kotlin.fir.FirSession +import org.jetbrains.kotlin.fir.caches.FirCache +import org.jetbrains.kotlin.fir.caches.firCachesFactory +import org.jetbrains.kotlin.fir.caches.getValue +import org.jetbrains.kotlin.fir.copy +import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration +import org.jetbrains.kotlin.fir.declarations.FirDeclaration +import org.jetbrains.kotlin.fir.declarations.FirDeclarationStatus +import org.jetbrains.kotlin.fir.declarations.FirRegularClass +import org.jetbrains.kotlin.fir.extensions.FirDeclarationPredicateRegistrar +import org.jetbrains.kotlin.fir.extensions.FirStatusTransformerExtension +import org.jetbrains.kotlin.fir.extensions.FirStatusTransformerExtension.Factory +import org.jetbrains.kotlin.fir.extensions.predicate.has +import org.jetbrains.kotlin.fir.extensions.predicate.metaHas +import org.jetbrains.kotlin.fir.extensions.predicate.or +import org.jetbrains.kotlin.fir.extensions.predicateBasedProvider +import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider +import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol +import org.jetbrains.kotlin.fir.types.toRegularClassSymbol +import org.jetbrains.kotlin.name.FqName + +class FirAllOpenStatusTransformer(allOpenAnnotationFqNames: List, session: FirSession) : FirStatusTransformerExtension(session) { + companion object { + fun getFactory(allOpenAnnotationFqNames: List): Factory { + return Factory { session -> FirAllOpenStatusTransformer(allOpenAnnotationFqNames, session) } + } + } + + private val annotationFqNames = allOpenAnnotationFqNames.map { FqName(it) } + private val hasPredicate = has(annotationFqNames) or metaHas(annotationFqNames) + + private val cache: FirCache = session.firCachesFactory.createCache { symbol, _ -> + symbol.annotated() + } + + override fun FirDeclarationPredicateRegistrar.registerPredicates() { + register(hasPredicate) + } + + override fun needTransformStatus(declaration: FirDeclaration): Boolean { + return when (declaration) { + is FirRegularClass -> declaration.classKind == ClassKind.CLASS && cache.getValue(declaration.symbol) + is FirCallableDeclaration -> { + val parentClassId = declaration.symbol.callableId.classId ?: return false + if (parentClassId.isLocal) return false + val parentClassSymbol = session.symbolProvider.getClassLikeSymbolByClassId(parentClassId) as? FirRegularClassSymbol + ?: return false + cache.getValue(parentClassSymbol) + } + else -> false + } + } + + private fun FirRegularClassSymbol.annotated(): Boolean { + if (session.predicateBasedProvider.matches(hasPredicate, this)) return true + return resolvedSuperTypes.any { + val superSymbol = it.toRegularClassSymbol(session) ?: return@any false + cache.getValue(superSymbol) + } + } + + override fun transformStatus(status: FirDeclarationStatus, declaration: FirDeclaration): FirDeclarationStatus { + return if (status.modality == null) { + status.copy(modality = Modality.OPEN) + } else { + status + } + } +} diff --git a/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/AbstractBytecodeListingTestForAllOpen.kt b/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/AbstractBytecodeListingTestForAllOpen.kt index 49239bf1846..adc653eaa9a 100644 --- a/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/AbstractBytecodeListingTestForAllOpen.kt +++ b/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/AbstractBytecodeListingTestForAllOpen.kt @@ -27,6 +27,9 @@ import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontend2ClassicBackend import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontend2IrConverter import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendFacade import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendOutputArtifact +import org.jetbrains.kotlin.test.frontend.fir.Fir2IrResultsConverter +import org.jetbrains.kotlin.test.frontend.fir.FirFrontendFacade +import org.jetbrains.kotlin.test.frontend.fir.FirOutputArtifact import org.jetbrains.kotlin.test.model.* import org.jetbrains.kotlin.test.runners.codegen.AbstractBytecodeListingTestBase @@ -65,3 +68,15 @@ open class AbstractIrBytecodeListingTestForAllOpen : override val backendFacade: Constructor> get() = ::JvmIrBackendFacade } + +open class AbstractFirBytecodeListingTestForAllOpen : + AbstractBytecodeListingTestForAllOpenBase( + TargetBackend.JVM_IR, FrontendKinds.FIR + ) { + override val frontendFacade: Constructor> + get() = ::FirFrontendFacade + override val frontendToBackendConverter: Constructor> + get() = ::Fir2IrResultsConverter + override val backendFacade: Constructor> + get() = ::JvmIrBackendFacade +} diff --git a/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/AllOpenEnvironmentConfigurator.kt b/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/AllOpenEnvironmentConfigurator.kt index 7690c6eed5b..171362424d6 100644 --- a/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/AllOpenEnvironmentConfigurator.kt +++ b/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/AllOpenEnvironmentConfigurator.kt @@ -6,8 +6,10 @@ package org.jetbrains.kotlin.allopen import com.intellij.openapi.project.Project +import org.jetbrains.kotlin.allopen.fir.FirAllOpenExtensionRegistrar import org.jetbrains.kotlin.config.CompilerConfiguration import org.jetbrains.kotlin.extensions.DeclarationAttributeAltererExtension +import org.jetbrains.kotlin.fir.extensions.FirExtensionRegistrar import org.jetbrains.kotlin.test.model.TestModule import org.jetbrains.kotlin.test.services.EnvironmentConfigurator import org.jetbrains.kotlin.test.services.TestServices @@ -21,5 +23,7 @@ class AllOpenEnvironmentConfigurator(testServices: TestServices) : EnvironmentCo project, CliAllOpenDeclarationAttributeAltererExtension(annotations) ) + + FirExtensionRegistrar.registerExtension(project, FirAllOpenExtensionRegistrar(annotations)) } } diff --git a/plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.kt b/plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.kt index abcac2a6138..c7c8c592da6 100644 --- a/plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.kt +++ b/plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.kt @@ -1,3 +1,6 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// FIR version does not go inside bodies +// Also it's quiestionable do we even need to transform local classes and anonymous objects annotation class AllOpen @AllOpen @@ -17,4 +20,4 @@ class Test { Runnable { 1 }.run() } -} \ No newline at end of file +} diff --git a/plugins/allopen/allopen-cli/testData/bytecodeListing/metaAnnotation.kt b/plugins/allopen/allopen-cli/testData/bytecodeListing/metaAnnotation.kt index 75b6a42e42b..f891df84c63 100644 --- a/plugins/allopen/allopen-cli/testData/bytecodeListing/metaAnnotation.kt +++ b/plugins/allopen/allopen-cli/testData/bytecodeListing/metaAnnotation.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// FIR version does not support double-transitive annotations by design annotation class AllOpen @AllOpen @@ -42,4 +44,4 @@ final class MyComponentImpl2_ShouldBeFinal : MyComponentBase() { class MyComponentImpl3_ShouldBeOpen : MyComponentBase() { final fun method_ShouldBeFinal() {} -} \ No newline at end of file +} diff --git a/plugins/allopen/allopen-cli/testData/bytecodeListing/nestedClass.kt b/plugins/allopen/allopen-cli/testData/bytecodeListing/nestedClass.kt new file mode 100644 index 00000000000..ef8556e5141 --- /dev/null +++ b/plugins/allopen/allopen-cli/testData/bytecodeListing/nestedClass.kt @@ -0,0 +1,11 @@ +annotation class AllOpen + +@AllOpen +class Test { + val prop: String = "" + fun method() {} + + class Nested { + fun nestedMethod() {} + } +} diff --git a/plugins/allopen/allopen-cli/testData/bytecodeListing/nestedClass.txt b/plugins/allopen/allopen-cli/testData/bytecodeListing/nestedClass.txt new file mode 100644 index 00000000000..fe53e15a144 --- /dev/null +++ b/plugins/allopen/allopen-cli/testData/bytecodeListing/nestedClass.txt @@ -0,0 +1,24 @@ +@java.lang.annotation.Retention(value=RUNTIME) +@kotlin.Metadata +public annotation class AllOpen { + // source: 'nestedClass.kt' +} + +@kotlin.Metadata +public final class Test$Nested { + // source: 'nestedClass.kt' + public method (): void + public final method nestedMethod(): void + public final inner class Test$Nested +} + +@AllOpen +@kotlin.Metadata +public class Test { + // source: 'nestedClass.kt' + private final @org.jetbrains.annotations.NotNull field prop: java.lang.String + public method (): void + public @org.jetbrains.annotations.NotNull method getProp(): java.lang.String + public method method(): void + public final inner class Test$Nested +} diff --git a/plugins/allopen/allopen-cli/tests-gen/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java b/plugins/allopen/allopen-cli/tests-gen/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java index d51c66ef42d..31fc55c4943 100644 --- a/plugins/allopen/allopen-cli/tests-gen/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java +++ b/plugins/allopen/allopen-cli/tests-gen/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java @@ -61,6 +61,12 @@ public class BytecodeListingTestForAllOpenGenerated extends AbstractBytecodeList runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/metaAnnotation.kt"); } + @Test + @TestMetadata("nestedClass.kt") + public void testNestedClass() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/nestedClass.kt"); + } + @Test @TestMetadata("nestedInner.kt") public void testNestedInner() throws Exception { diff --git a/plugins/allopen/allopen-cli/tests-gen/org/jetbrains/kotlin/allopen/FirBytecodeListingTestForAllOpenGenerated.java b/plugins/allopen/allopen-cli/tests-gen/org/jetbrains/kotlin/allopen/FirBytecodeListingTestForAllOpenGenerated.java new file mode 100644 index 00000000000..ec971869394 --- /dev/null +++ b/plugins/allopen/allopen-cli/tests-gen/org/jetbrains/kotlin/allopen/FirBytecodeListingTestForAllOpenGenerated.java @@ -0,0 +1,117 @@ +/* + * Copyright 2010-2021 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.allopen; + +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 GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing") +@TestDataPath("$PROJECT_ROOT") +public class FirBytecodeListingTestForAllOpenGenerated extends AbstractFirBytecodeListingTestForAllOpen { + @Test + public void testAllFilesPresentInBytecodeListing() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/allopen/allopen-cli/testData/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("allOpenOnNotClasses.kt") + public void testAllOpenOnNotClasses() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/allOpenOnNotClasses.kt"); + } + + @Test + @TestMetadata("alreadyOpen.kt") + public void testAlreadyOpen() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/alreadyOpen.kt"); + } + + @Test + @TestMetadata("annotationMembers.kt") + public void testAnnotationMembers() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/annotationMembers.kt"); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.kt"); + } + + @Test + @TestMetadata("explicitFinal.kt") + public void testExplicitFinal() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/explicitFinal.kt"); + } + + @Test + @TestMetadata("metaAnnotation.kt") + public void testMetaAnnotation() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/metaAnnotation.kt"); + } + + @Test + @TestMetadata("nestedClass.kt") + public void testNestedClass() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/nestedClass.kt"); + } + + @Test + @TestMetadata("nestedInner.kt") + public void testNestedInner() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/nestedInner.kt"); + } + + @Test + @TestMetadata("noAllOpen.kt") + public void testNoAllOpen() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/noAllOpen.kt"); + } + + @Test + @TestMetadata("privateMembers.kt") + public void testPrivateMembers() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/privateMembers.kt"); + } + + @Test + @TestMetadata("sealed.kt") + public void testSealed() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/sealed.kt"); + } + + @Test + @TestMetadata("severalAllOpen.kt") + public void testSeveralAllOpen() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/severalAllOpen.kt"); + } + + @Test + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/simple.kt"); + } + + @Test + @TestMetadata("springAnnotations.kt") + public void testSpringAnnotations() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/springAnnotations.kt"); + } + + @Test + @TestMetadata("superClassAnnotation.kt") + public void testSuperClassAnnotation() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/superClassAnnotation.kt"); + } +} diff --git a/plugins/allopen/allopen-cli/tests-gen/org/jetbrains/kotlin/allopen/IrBytecodeListingTestForAllOpenGenerated.java b/plugins/allopen/allopen-cli/tests-gen/org/jetbrains/kotlin/allopen/IrBytecodeListingTestForAllOpenGenerated.java index ae09100ff12..66194dfa305 100644 --- a/plugins/allopen/allopen-cli/tests-gen/org/jetbrains/kotlin/allopen/IrBytecodeListingTestForAllOpenGenerated.java +++ b/plugins/allopen/allopen-cli/tests-gen/org/jetbrains/kotlin/allopen/IrBytecodeListingTestForAllOpenGenerated.java @@ -61,6 +61,12 @@ public class IrBytecodeListingTestForAllOpenGenerated extends AbstractIrBytecode runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/metaAnnotation.kt"); } + @Test + @TestMetadata("nestedClass.kt") + public void testNestedClass() throws Exception { + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/nestedClass.kt"); + } + @Test @TestMetadata("nestedInner.kt") public void testNestedInner() throws Exception {