[NoArg] Migrate NoArg tests to new test infrastructure

This commit is contained in:
Dmitriy Novozhilov
2022-05-17 17:30:35 +03:00
committed by teamcity
parent 8fc4962213
commit 60df531c02
21 changed files with 233 additions and 174 deletions
@@ -222,20 +222,6 @@ fun main(args: Array<String>) {
}
}
testGroup("plugins/noarg/noarg-cli/test", "plugins/noarg/noarg-cli/testData") {
testClass<AbstractDiagnosticsTestForNoArg> { model("diagnostics", extension = "kt") }
testClass<AbstractBytecodeListingTestForNoArg> {
model("bytecodeListing", extension = "kt", targetBackend = TargetBackend.JVM)
}
testClass<AbstractIrBytecodeListingTestForNoArg> {
model("bytecodeListing", extension = "kt", targetBackend = TargetBackend.JVM_IR)
}
testClass<AbstractBlackBoxCodegenTestForNoArg> { model("box", targetBackend = TargetBackend.JVM) }
testClass<AbstractIrBlackBoxCodegenTestForNoArg> { model("box", targetBackend = TargetBackend.JVM_IR) }
}
testGroup("plugins/sam-with-receiver/sam-with-receiver-cli/test", "plugins/sam-with-receiver/sam-with-receiver-cli/testData") {
testClass<AbstractSamWithReceiverTest> {
model("diagnostics")
@@ -414,5 +400,22 @@ fun main(args: Array<String>) {
}
}
testGroup("plugins/noarg/tests-gen", "plugins/noarg/testData") {
testClass<AbstractDiagnosticsTestForNoArg> {
model("diagnostics", excludedPattern = excludedFirTestdataPattern)
}
testClass<AbstractBytecodeListingTestForNoArg> {
model("bytecodeListing", excludedPattern = excludedFirTestdataPattern)
}
testClass<AbstractIrBytecodeListingTestForNoArg> {
model("bytecodeListing", excludedPattern = excludedFirTestdataPattern)
}
testClass<AbstractBlackBoxCodegenTestForNoArg> {
model("box")
}
testClass<AbstractIrBlackBoxCodegenTestForNoArg> {
model("box")
}
}
}
}
+16 -3
View File
@@ -12,14 +12,26 @@ dependencies {
testApi(project(":compiler:backend"))
testApi(project(":compiler:cli"))
testApi(projectTests(":compiler:tests-common"))
testApi(commonDependency("junit:junit"))
testApi(project(":kotlin-noarg-compiler-plugin.cli"))
testApiJUnit5()
testApi(projectTests(":compiler:tests-common-new"))
testApi(projectTests(":compiler:test-infrastructure"))
testApi(projectTests(":compiler:test-infrastructure-utils"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testApi(intellijCore())
}
sourceSets {
"main" { none() }
"test" { projectDefault() }
"test" {
projectDefault()
generatedTestDir()
}
}
runtimeJar()
@@ -29,4 +41,5 @@ testsJar()
projectTest(parallel = true) {
workingDir = rootDir
useJUnitPlatform()
}
@@ -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.noarg
@@ -96,7 +85,7 @@ class NoArgComponentRegistrar : ComponentRegistrar {
}
}
internal companion object {
companion object {
fun registerNoArgComponents(project: Project, annotations: List<String>, useIr: Boolean, invokeInitializers: Boolean) {
StorageComponentContainerContributor.registerExtension(project, CliNoArgComponentContainerContributor(annotations, useIr))
ExpressionCodegenExtension.registerExtension(project, CliNoArgExpressionCodegenExtension(annotations, invokeInitializers))
@@ -5,47 +5,84 @@
package org.jetbrains.kotlin.noarg
import org.jetbrains.kotlin.ObsoleteTestInfrastructure
import org.jetbrains.kotlin.checkers.AbstractDiagnosticsTest
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
import org.jetbrains.kotlin.codegen.AbstractBlackBoxCodegenTest
import org.jetbrains.kotlin.codegen.AbstractBytecodeListingTest
import org.jetbrains.kotlin.test.TargetBackend
import com.intellij.openapi.project.Project
import org.jetbrains.kotlin.config.CompilerConfiguration
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
import org.jetbrains.kotlin.test.directives.model.DirectivesContainer
import org.jetbrains.kotlin.test.directives.model.SimpleDirectivesContainer
import org.jetbrains.kotlin.test.model.TestModule
import org.jetbrains.kotlin.test.runners.AbstractDiagnosticTest
import org.jetbrains.kotlin.test.runners.codegen.AbstractBlackBoxCodegenTest
import org.jetbrains.kotlin.test.runners.codegen.AbstractBytecodeListingTest
import org.jetbrains.kotlin.test.runners.codegen.AbstractIrBlackBoxCodegenTest
import org.jetbrains.kotlin.test.runners.codegen.AbstractIrBytecodeListingTest
import org.jetbrains.kotlin.test.services.EnvironmentConfigurator
import org.jetbrains.kotlin.test.services.TestServices
internal val NOARG_ANNOTATIONS = listOf("NoArg", "NoArg2", "test.NoArg")
// ---------------------------- codegen ----------------------------
@OptIn(ObsoleteTestInfrastructure::class)
abstract class AbstractBlackBoxCodegenTestForNoArg : AbstractBlackBoxCodegenTest() {
override fun loadMultiFiles(files: MutableList<TestFile>) {
open class AbstractBlackBoxCodegenTestForNoArg : AbstractBlackBoxCodegenTest() {
override fun configure(builder: TestConfigurationBuilder) {
super.configure(builder)
builder.enableNoArg()
}
}
open class AbstractIrBlackBoxCodegenTestForNoArg : AbstractIrBlackBoxCodegenTest() {
override fun configure(builder: TestConfigurationBuilder) {
super.configure(builder)
builder.enableNoArg()
}
}
// ---------------------------- bytecode ----------------------------
open class AbstractBytecodeListingTestForNoArg : AbstractBytecodeListingTest() {
override fun configure(builder: TestConfigurationBuilder) {
super.configure(builder)
builder.enableNoArg()
}
}
open class AbstractIrBytecodeListingTestForNoArg : AbstractIrBytecodeListingTest() {
override fun configure(builder: TestConfigurationBuilder) {
super.configure(builder)
builder.enableNoArg()
}
}
// ---------------------------- diagnostic ----------------------------
abstract class AbstractDiagnosticsTestForNoArg : AbstractDiagnosticTest() {
override fun configure(builder: TestConfigurationBuilder) {
super.configure(builder)
builder.enableNoArg()
}
}
// ---------------------------- configurator ----------------------------
private fun TestConfigurationBuilder.enableNoArg() {
useConfigurators(::NoArgEnvironmentConfigurator)
}
class NoArgEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfigurator(testServices) {
companion object {
private val NOARG_ANNOTATIONS = listOf("NoArg", "NoArg2", "test.NoArg")
}
override val directiveContainers: List<DirectivesContainer> = listOf(NoArgDirectives)
override fun registerCompilerExtensions(project: Project, module: TestModule, configuration: CompilerConfiguration) {
NoArgComponentRegistrar.registerNoArgComponents(
myEnvironment.project,
project,
NOARG_ANNOTATIONS,
backend.isIR,
files.any { it.directives.contains("INVOKE_INITIALIZERS") },
useIr = module.targetBackend?.isIR == true,
invokeInitializers = NoArgDirectives.INVOKE_INITIALIZERS in module.directives
)
super.loadMultiFiles(files)
}
}
@OptIn(ObsoleteTestInfrastructure::class)
abstract class AbstractBytecodeListingTestForNoArg : AbstractBytecodeListingTest() {
override fun setupEnvironment(environment: KotlinCoreEnvironment) {
NoArgComponentRegistrar.registerNoArgComponents(environment.project, NOARG_ANNOTATIONS, backend.isIR, false)
}
}
abstract class AbstractIrBlackBoxCodegenTestForNoArg : AbstractBlackBoxCodegenTestForNoArg() {
override val backend: TargetBackend get() = TargetBackend.JVM_IR
}
abstract class AbstractIrBytecodeListingTestForNoArg : AbstractBytecodeListingTestForNoArg() {
override val backend: TargetBackend get() = TargetBackend.JVM_IR
}
@OptIn(ObsoleteTestInfrastructure::class)
abstract class AbstractDiagnosticsTestForNoArg : AbstractDiagnosticsTest() {
override fun setupEnvironment(environment: KotlinCoreEnvironment) {
NoArgComponentRegistrar.registerNoArgComponents(environment.project, NOARG_ANNOTATIONS, backend.isIR, false)
}
object NoArgDirectives : SimpleDirectivesContainer() {
val INVOKE_INITIALIZERS by directive("Enable 'Invoke initializers' mode")
}
+1 -1
View File
@@ -28,7 +28,7 @@ public final class MyClass {
}
@NoArg
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class NoArg {
// source: 'annoOnNotClass.kt'
@@ -29,7 +29,7 @@ public final class MyClass {
}
@NoArg
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class NoArg {
// source: 'annoOnNotClass.kt'
@@ -6,7 +6,7 @@ public final class Internal {
public method <init>(p0: boolean): void
}
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class NoArg {
// source: 'constructorVisibility.kt'
@@ -5,13 +5,13 @@ public interface BaseIntf {
}
@NoArg
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class MetaAnno {
// source: 'defaultParameters.kt'
}
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class NoArg {
// source: 'defaultParameters.kt'
+2 -2
View File
@@ -5,13 +5,13 @@ public interface Base {
}
@NoArg
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class MyAnno {
// source: 'inherited.kt'
}
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class NoArg {
// source: 'inherited.kt'
+1 -1
View File
@@ -1,4 +1,4 @@
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class NoArg {
// source: 'nestedClass.kt'
+1 -1
View File
@@ -1,4 +1,4 @@
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class NoArg {
// source: 'noNoArg.kt'
+2 -2
View File
@@ -1,10 +1,10 @@
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class NoArg {
// source: 'severalNoArg.kt'
}
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class NoArg2 {
// source: 'severalNoArg.kt'
+1 -1
View File
@@ -1,4 +1,4 @@
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class NoArg {
// source: 'simple.kt'
+1 -1
View File
@@ -18,7 +18,7 @@ public final class MyClass {
public method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
}
@java.lang.annotation.Retention
@java.lang.annotation.Retention(value=RUNTIME)
@kotlin.Metadata
public annotation class NoArg {
// source: 'superTypes.kt'
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
annotation class NoArg
class Outer {
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
annotation class NoArg
open class Base(val s: String)
@@ -6,77 +6,82 @@
package org.jetbrains.kotlin.noarg;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
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.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("plugins/noarg/noarg-cli/testData/box")
@TestMetadata("plugins/noarg/testData/box")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class BlackBoxCodegenTestForNoArgGenerated extends AbstractBlackBoxCodegenTestForNoArg {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
@Test
public void testAllFilesPresentInBox() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/noarg-cli/testData/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/testData/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@Test
@TestMetadata("initializers.kt")
public void testInitializers() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/initializers.kt");
runTest("plugins/noarg/testData/box/initializers.kt");
}
@Test
@TestMetadata("initializersWithoutInvokeInitializers.kt")
public void testInitializersWithoutInvokeInitializers() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/initializersWithoutInvokeInitializers.kt");
runTest("plugins/noarg/testData/box/initializersWithoutInvokeInitializers.kt");
}
@Test
@TestMetadata("kt18245.kt")
public void testKt18245() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/kt18245.kt");
runTest("plugins/noarg/testData/box/kt18245.kt");
}
@Test
@TestMetadata("kt18667.kt")
public void testKt18667() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/kt18667.kt");
runTest("plugins/noarg/testData/box/kt18667.kt");
}
@Test
@TestMetadata("kt18668.kt")
public void testKt18668() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/kt18668.kt");
runTest("plugins/noarg/testData/box/kt18668.kt");
}
@Test
@TestMetadata("localClassInInitiailzer.kt")
public void testLocalClassInInitiailzer() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/localClassInInitiailzer.kt");
runTest("plugins/noarg/testData/box/localClassInInitiailzer.kt");
}
@Test
@TestMetadata("nestedClass.kt")
public void testNestedClass() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/nestedClass.kt");
runTest("plugins/noarg/testData/box/nestedClass.kt");
}
@Test
@TestMetadata("sealedClassWithExistingNoargCtor.kt")
public void testSealedClassWithExistingNoargCtor() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/sealedClassWithExistingNoargCtor.kt");
runTest("plugins/noarg/testData/box/sealedClassWithExistingNoargCtor.kt");
}
@Test
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/simple.kt");
runTest("plugins/noarg/testData/box/simple.kt");
}
@Test
@TestMetadata("subclass.kt")
public void testSubclass() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/subclass.kt");
runTest("plugins/noarg/testData/box/subclass.kt");
}
}
@@ -6,72 +6,76 @@
package org.jetbrains.kotlin.noarg;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
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.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("plugins/noarg/noarg-cli/testData/bytecodeListing")
@TestMetadata("plugins/noarg/testData/bytecodeListing")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class BytecodeListingTestForNoArgGenerated extends AbstractBytecodeListingTestForNoArg {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
@Test
public void testAllFilesPresentInBytecodeListing() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/noarg-cli/testData/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/testData/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), TargetBackend.JVM, true);
}
@Test
@TestMetadata("annoOnNotClass.kt")
public void testAnnoOnNotClass() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/annoOnNotClass.kt");
runTest("plugins/noarg/testData/bytecodeListing/annoOnNotClass.kt");
}
@Test
@TestMetadata("constructorVisibility.kt")
public void testConstructorVisibility() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/constructorVisibility.kt");
runTest("plugins/noarg/testData/bytecodeListing/constructorVisibility.kt");
}
@Test
@TestMetadata("defaultParameters.kt")
public void testDefaultParameters() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/defaultParameters.kt");
runTest("plugins/noarg/testData/bytecodeListing/defaultParameters.kt");
}
@Test
@TestMetadata("inherited.kt")
public void testInherited() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/inherited.kt");
runTest("plugins/noarg/testData/bytecodeListing/inherited.kt");
}
@Test
@TestMetadata("nestedClass.kt")
public void testNestedClass() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/nestedClass.kt");
runTest("plugins/noarg/testData/bytecodeListing/nestedClass.kt");
}
@Test
@TestMetadata("noNoArg.kt")
public void testNoNoArg() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/noNoArg.kt");
runTest("plugins/noarg/testData/bytecodeListing/noNoArg.kt");
}
@Test
@TestMetadata("severalNoArg.kt")
public void testSeveralNoArg() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/severalNoArg.kt");
runTest("plugins/noarg/testData/bytecodeListing/severalNoArg.kt");
}
@Test
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/simple.kt");
runTest("plugins/noarg/testData/bytecodeListing/simple.kt");
}
@Test
@TestMetadata("superTypes.kt")
public void testSuperTypes() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/superTypes.kt");
runTest("plugins/noarg/testData/bytecodeListing/superTypes.kt");
}
}
@@ -6,36 +6,33 @@
package org.jetbrains.kotlin.noarg;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
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.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("plugins/noarg/noarg-cli/testData/diagnostics")
@TestMetadata("plugins/noarg/testData/diagnostics")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class DiagnosticsTestForNoArgGenerated extends AbstractDiagnosticsTestForNoArg {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
@Test
public void testAllFilesPresentInDiagnostics() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/noarg-cli/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), null, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@Test
@TestMetadata("innerClass.kt")
public void testInnerClass() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/diagnostics/innerClass.kt");
runTest("plugins/noarg/testData/diagnostics/innerClass.kt");
}
@Test
@TestMetadata("noNoargCtorInSuperclass.kt")
public void testNoNoargCtorInSuperclass() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/diagnostics/noNoargCtorInSuperclass.kt");
runTest("plugins/noarg/testData/diagnostics/noNoargCtorInSuperclass.kt");
}
}
@@ -6,77 +6,82 @@
package org.jetbrains.kotlin.noarg;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
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.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("plugins/noarg/noarg-cli/testData/box")
@TestMetadata("plugins/noarg/testData/box")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class IrBlackBoxCodegenTestForNoArgGenerated extends AbstractIrBlackBoxCodegenTestForNoArg {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
@Test
public void testAllFilesPresentInBox() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/noarg-cli/testData/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/testData/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("initializers.kt")
public void testInitializers() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/initializers.kt");
runTest("plugins/noarg/testData/box/initializers.kt");
}
@Test
@TestMetadata("initializersWithoutInvokeInitializers.kt")
public void testInitializersWithoutInvokeInitializers() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/initializersWithoutInvokeInitializers.kt");
runTest("plugins/noarg/testData/box/initializersWithoutInvokeInitializers.kt");
}
@Test
@TestMetadata("kt18245.kt")
public void testKt18245() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/kt18245.kt");
runTest("plugins/noarg/testData/box/kt18245.kt");
}
@Test
@TestMetadata("kt18667.kt")
public void testKt18667() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/kt18667.kt");
runTest("plugins/noarg/testData/box/kt18667.kt");
}
@Test
@TestMetadata("kt18668.kt")
public void testKt18668() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/kt18668.kt");
runTest("plugins/noarg/testData/box/kt18668.kt");
}
@Test
@TestMetadata("localClassInInitiailzer.kt")
public void testLocalClassInInitiailzer() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/localClassInInitiailzer.kt");
runTest("plugins/noarg/testData/box/localClassInInitiailzer.kt");
}
@Test
@TestMetadata("nestedClass.kt")
public void testNestedClass() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/nestedClass.kt");
runTest("plugins/noarg/testData/box/nestedClass.kt");
}
@Test
@TestMetadata("sealedClassWithExistingNoargCtor.kt")
public void testSealedClassWithExistingNoargCtor() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/sealedClassWithExistingNoargCtor.kt");
runTest("plugins/noarg/testData/box/sealedClassWithExistingNoargCtor.kt");
}
@Test
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/simple.kt");
runTest("plugins/noarg/testData/box/simple.kt");
}
@Test
@TestMetadata("subclass.kt")
public void testSubclass() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/box/subclass.kt");
runTest("plugins/noarg/testData/box/subclass.kt");
}
}
@@ -6,72 +6,76 @@
package org.jetbrains.kotlin.noarg;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
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.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("plugins/noarg/noarg-cli/testData/bytecodeListing")
@TestMetadata("plugins/noarg/testData/bytecodeListing")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class IrBytecodeListingTestForNoArgGenerated extends AbstractIrBytecodeListingTestForNoArg {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
@Test
public void testAllFilesPresentInBytecodeListing() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/noarg-cli/testData/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/noarg/testData/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("annoOnNotClass.kt")
public void testAnnoOnNotClass() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/annoOnNotClass.kt");
runTest("plugins/noarg/testData/bytecodeListing/annoOnNotClass.kt");
}
@Test
@TestMetadata("constructorVisibility.kt")
public void testConstructorVisibility() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/constructorVisibility.kt");
runTest("plugins/noarg/testData/bytecodeListing/constructorVisibility.kt");
}
@Test
@TestMetadata("defaultParameters.kt")
public void testDefaultParameters() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/defaultParameters.kt");
runTest("plugins/noarg/testData/bytecodeListing/defaultParameters.kt");
}
@Test
@TestMetadata("inherited.kt")
public void testInherited() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/inherited.kt");
runTest("plugins/noarg/testData/bytecodeListing/inherited.kt");
}
@Test
@TestMetadata("nestedClass.kt")
public void testNestedClass() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/nestedClass.kt");
runTest("plugins/noarg/testData/bytecodeListing/nestedClass.kt");
}
@Test
@TestMetadata("noNoArg.kt")
public void testNoNoArg() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/noNoArg.kt");
runTest("plugins/noarg/testData/bytecodeListing/noNoArg.kt");
}
@Test
@TestMetadata("severalNoArg.kt")
public void testSeveralNoArg() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/severalNoArg.kt");
runTest("plugins/noarg/testData/bytecodeListing/severalNoArg.kt");
}
@Test
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/simple.kt");
runTest("plugins/noarg/testData/bytecodeListing/simple.kt");
}
@Test
@TestMetadata("superTypes.kt")
public void testSuperTypes() throws Exception {
runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/superTypes.kt");
runTest("plugins/noarg/testData/bytecodeListing/superTypes.kt");
}
}