From 16ea3d9ae96a0c4c66890a5deb4e3b42d8e5bdd1 Mon Sep 17 00:00:00 2001 From: Roman Artemev Date: Fri, 4 Jun 2021 19:26:06 +0300 Subject: [PATCH] [TEST] Add IrText klib tests --- .../jetbrains/kotlin/ir/backend/js/klib.kt | 2 +- .../kotlin/ir/AbstractKlibTextTestCase.kt | 278 +++ .../generators/GenerateJUnit3CompilerTests.kt | 12 +- .../ir/KlibJsTextTestCaseGenerated.java | 204 ++ .../kotlin/ir/KlibTextTestCaseGenerated.java | 2030 +++++++++++++++++ 5 files changed, 2522 insertions(+), 4 deletions(-) create mode 100644 compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractKlibTextTestCase.kt create mode 100644 compiler/tests-gen/org/jetbrains/kotlin/ir/KlibJsTextTestCaseGenerated.java create mode 100644 compiler/tests-gen/org/jetbrains/kotlin/ir/KlibTextTestCaseGenerated.java diff --git a/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/klib.kt b/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/klib.kt index ab81daa1f8f..990b3ea1ebd 100644 --- a/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/klib.kt +++ b/compiler/ir/serialization.js/src/org/jetbrains/kotlin/ir/backend/js/klib.kt @@ -361,7 +361,7 @@ fun GeneratorContext.generateModuleFragmentWithPlugins( } private fun createBuiltIns(storageManager: StorageManager) = object : KotlinBuiltIns(storageManager) {} -internal val JsFactories = KlibMetadataFactories(::createBuiltIns, DynamicTypeDeserializer) +public val JsFactories = KlibMetadataFactories(::createBuiltIns, DynamicTypeDeserializer) fun getModuleDescriptorByLibrary(current: KotlinLibrary, mapping: Map): ModuleDescriptorImpl { val md = JsFactories.DefaultDeserializedDescriptorFactory.createDescriptorOptionalBuiltIns( diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractKlibTextTestCase.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractKlibTextTestCase.kt new file mode 100644 index 00000000000..c9c385522e7 --- /dev/null +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractKlibTextTestCase.kt @@ -0,0 +1,278 @@ +/* + * 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.ir + +import com.intellij.openapi.project.Project +import com.intellij.psi.PsiElement +import junit.framework.TestCase +import org.jetbrains.kotlin.backend.common.serialization.DeserializationStrategy +import org.jetbrains.kotlin.backend.common.serialization.KlibIrVersion +import org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataIncrementalSerializer +import org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataVersion +import org.jetbrains.kotlin.backend.common.serialization.signature.IdSignatureDescriptor +import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles +import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment +import org.jetbrains.kotlin.codegen.CodegenTestCase +import org.jetbrains.kotlin.config.* +import org.jetbrains.kotlin.descriptors.DeclarationDescriptor +import org.jetbrains.kotlin.descriptors.ModuleDescriptor +import org.jetbrains.kotlin.descriptors.impl.ModuleDescriptorImpl +import org.jetbrains.kotlin.incremental.components.LookupTracker +import org.jetbrains.kotlin.ir.backend.js.JsFactories +import org.jetbrains.kotlin.ir.backend.js.KotlinFileSerializedData +import org.jetbrains.kotlin.ir.backend.js.jsResolveLibraries +import org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsIrLinker +import org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsIrModuleSerializer +import org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsManglerDesc +import org.jetbrains.kotlin.ir.declarations.IrModuleFragment +import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl +import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns +import org.jetbrains.kotlin.ir.descriptors.IrFunctionFactory +import org.jetbrains.kotlin.ir.symbols.IrSymbol +import org.jetbrains.kotlin.ir.util.* +import org.jetbrains.kotlin.js.analyze.TopDownAnalyzerFacadeForJS +import org.jetbrains.kotlin.library.* +import org.jetbrains.kotlin.library.impl.BuiltInsPlatform +import org.jetbrains.kotlin.library.impl.buildKotlinLibrary +import org.jetbrains.kotlin.library.resolver.TopologicalLibraryOrder +import org.jetbrains.kotlin.metadata.ProtoBuf +import org.jetbrains.kotlin.psi.KtFile +import org.jetbrains.kotlin.psi2ir.Psi2IrConfiguration +import org.jetbrains.kotlin.psi2ir.Psi2IrTranslator +import org.jetbrains.kotlin.psi2ir.generators.TypeTranslatorImpl +import org.jetbrains.kotlin.resolve.AnalyzingUtils +import org.jetbrains.kotlin.resolve.BindingContext +import org.jetbrains.kotlin.resolve.BindingContextUtils +import org.jetbrains.kotlin.resolve.CompilerEnvironment +import org.jetbrains.kotlin.storage.LockBasedStorageManager +import org.jetbrains.kotlin.test.ConfigurationKind +import org.jetbrains.kotlin.test.TestJdkKind +import org.jetbrains.kotlin.test.util.KtTestUtil +import org.jetbrains.kotlin.util.DummyLogger +import org.jetbrains.kotlin.utils.rethrow +import java.io.File +import java.util.* + +abstract class AbstractKlibTextTestCase : CodegenTestCase() { + override fun doMultiFileTest(wholeFile: File, files: List) { + setupEnvironment(files) + + loadMultiFiles(files) + doTest(wholeFile) + } + + private fun setupEnvironment(files: List) { + val configuration = createConfiguration( + ConfigurationKind.ALL, TestJdkKind.MOCK_JDK, backend, + listOf(KtTestUtil.getAnnotationsJar()), + listOfNotNull(writeJavaFiles(files)), + files + ) + configuration.put(CommonConfigurationKeys.MODULE_NAME, "testModule") + myEnvironment = KotlinCoreEnvironment.createForTests(testRootDisposable, configuration, EnvironmentConfigFiles.JS_CONFIG_FILES) + } + + private val CompilerConfiguration.expectActualLinker: Boolean + get() = get(CommonConfigurationKeys.EXPECT_ACTUAL_LINKER) ?: false + + fun doTest(wholeFile: File) { + val expectActualSymbols = mutableMapOf() + val ignoreErrors = AbstractIrGeneratorTestCase.shouldIgnoreErrors(wholeFile) + val stdlib = loadKlibFromPath(listOf(runtimeKlibPath)).single() + val (irModule, bindingContext) = buildFragmentAndLinkIt(stdlib, ignoreErrors, expectActualSymbols) + val expected = irModule.dump() + val mppProject = + myEnvironment.configuration.languageVersionSettings.getFeatureSupport(LanguageFeature.MultiPlatformProjects) == LanguageFeature.State.ENABLED + val klibPath = serializeModule(irModule, bindingContext, stdlib, ignoreErrors, expectActualSymbols, !mppProject) + val libs = loadKlibFromPath(listOf(runtimeKlibPath, klibPath)) + val stdlib2 = libs[0] + val klib = libs[1] + val deserializedIrModule = deserializeModule(stdlib2, klib) + val actual = deserializedIrModule.dump() + + try { + TestCase.assertEquals(wholeFile.name, expected, actual) + } catch (e: Throwable) { + throw rethrow(e) + } + } + + private fun KlibMetadataIncrementalSerializer(configuration: CompilerConfiguration, project: Project, allowErrors: Boolean) = + KlibMetadataIncrementalSerializer( + languageVersionSettings = configuration.languageVersionSettings, + metadataVersion = KlibMetadataVersion.INSTANCE, + project = project, + exportKDoc = false, + skipExpects = true, + allowErrorTypes = allowErrors + ) + + private fun getDescriptorForElement( + context: BindingContext, + element: PsiElement + ): DeclarationDescriptor = BindingContextUtils.getNotNull(context, BindingContext.DECLARATION_TO_DESCRIPTOR, element) + + private fun KlibMetadataIncrementalSerializer.serializeScope( + ktFile: KtFile, + bindingContext: BindingContext, + moduleDescriptor: ModuleDescriptor + ): ProtoBuf.PackageFragment { + val memberScope = ktFile.declarations.map { getDescriptorForElement(bindingContext, it) } + return serializePackageFragment(moduleDescriptor, memberScope, ktFile.packageFqName) + } + + protected fun serializeModule(irModuleFragment: IrModuleFragment, bindingContext: BindingContext, stdlib: KotlinLibrary, containsErrorCode: Boolean, expectActualSymbols: MutableMap, skipExpect: Boolean): String { + val ktFiles = myFiles.psiFiles + val serializedIr = + JsIrModuleSerializer(IrMessageLogger.None, irModuleFragment.irBuiltins, expectActualSymbols, skipExpect).serializedIrModule( + irModuleFragment + ) + + val moduleDescriptor = irModuleFragment.descriptor + val metadataSerializer = KlibMetadataIncrementalSerializer(myEnvironment.configuration, myEnvironment.project, containsErrorCode) + + + val compiledKotlinFiles = mutableListOf() + for ((ktFile, binaryFile) in ktFiles.zip(serializedIr.files)) { + assert(ktFile.virtualFilePath == binaryFile.path) { + """The Kt and Ir files are put in different order + Kt: ${ktFile.virtualFilePath} + Ir: ${binaryFile.path} + """.trimMargin() + } + val packageFragment = metadataSerializer.serializeScope(ktFile, bindingContext, moduleDescriptor) + val compiledKotlinFile = KotlinFileSerializedData(packageFragment.toByteArray(), binaryFile) + + compiledKotlinFiles += compiledKotlinFile + } + + val header = metadataSerializer.serializeHeader( + moduleDescriptor, + compiledKotlinFiles.map { it.irData.fqName }.distinct().sorted(), + emptyList() + ).toByteArray() + + + val serializedMetadata = metadataSerializer.serializedMetadata( + compiledKotlinFiles.groupBy { it.irData.fqName } + .map { (fqn, data) -> fqn to data.sortedBy { it.irData.path }.map { it.metadata } }.toMap(), + header + ) + + val fullSerializedIr = SerializedIrModule(compiledKotlinFiles.map { it.irData }) + + val properties = Properties().also { p -> + if (containsErrorCode) { + p.setProperty(KLIB_PROPERTY_CONTAINS_ERROR_CODE, "true") + } + } + + val versions = KotlinLibraryVersioning( + abiVersion = KotlinAbiVersion.CURRENT, + libraryVersion = null, + compilerVersion = KotlinCompilerVersion.VERSION, + metadataVersion = KlibMetadataVersion.INSTANCE.toString(), + irVersion = KlibIrVersion.INSTANCE.toString() + ) + + val moduleName = irModuleFragment.name.asString() + val klibDir = org.jetbrains.kotlin.konan.file.createTempDir(moduleName) + + buildKotlinLibrary( + linkDependencies = listOf(stdlib), + ir = fullSerializedIr, + metadata = serializedMetadata, + dataFlowGraph = null, + manifestProperties = properties, + moduleName = moduleName, + nopack = true, + perFile = false, + output = klibDir.canonicalPath, + versions = versions, + builtInsPlatform = BuiltInsPlatform.JS + ) + + return klibDir.canonicalPath + } + + protected fun deserializeModule(stdlib: KotlinLibrary, klib: KotlinLibrary): IrModuleFragment { + val signaturer = IdSignatureDescriptor(JsManglerDesc) + + val stdlibDescriptor = getModuleDescriptor(stdlib) + val testDescriptor = getModuleDescriptor(klib, stdlibDescriptor) + + val symbolTable = SymbolTable(signaturer, IrFactoryImpl) + val typeTranslator = + TypeTranslatorImpl(symbolTable, myEnvironment.configuration.languageVersionSettings, testDescriptor) + val irBuiltIns = IrBuiltIns(testDescriptor.builtIns, typeTranslator, symbolTable) + val functionFactory = IrFunctionFactory(irBuiltIns, symbolTable) + irBuiltIns.functionFactory = functionFactory + val irLinker = JsIrLinker(null, IrMessageLogger.None, irBuiltIns, symbolTable, functionFactory, null, null) + irLinker.deserializeIrModuleHeader(stdlibDescriptor, stdlib) + val testModule = irLinker.deserializeIrModuleHeader(testDescriptor, klib, DeserializationStrategy.ALL) + irLinker.init(null, emptyList()) + ExternalDependenciesGenerator(symbolTable, listOf(irLinker)).generateUnboundSymbolsAsDependencies() + irLinker.postProcess() + return testModule + } + + private fun loadKlibFromPath(paths: List): List { + val result = jsResolveLibraries(paths, emptyList(), DummyLogger) + return result.getFullList(TopologicalLibraryOrder) + } + + private val runtimeKlibPath = "libraries/stdlib/js-ir/build/classes/kotlin/js/main" + + private fun buildFragmentAndLinkIt(stdlib: KotlinLibrary, ignoreErrors: Boolean, expectActualSymbols: MutableMap): Pair { + return generateIrModule(stdlib, ignoreErrors, expectActualSymbols) + } + + fun getModuleDescriptor(current: KotlinLibrary, builtins: ModuleDescriptorImpl? = null): ModuleDescriptorImpl { + val lookupTracker = LookupTracker.DO_NOTHING + val md = JsFactories.DefaultDeserializedDescriptorFactory.createDescriptorOptionalBuiltIns( + current, + myEnvironment.configuration.languageVersionSettings, + LockBasedStorageManager("ModulesStructure"), + builtins?.builtIns, + packageAccessHandler = null, // TODO: This is a speed optimization used by Native. Don't bother for now. + lookupTracker = lookupTracker + ) + md.setDependencies(listOfNotNull(builtins, md)) + return md + } + + private fun generateIrModule(stdlib: KotlinLibrary, ignoreErrors: Boolean, expectActualSymbols: MutableMap): Pair { + val stdlibDescriptor = getModuleDescriptor(stdlib) + + val ktFiles = myFiles.psiFiles + + val psi2Ir = Psi2IrTranslator(myEnvironment.configuration.languageVersionSettings, Psi2IrConfiguration(ignoreErrors)) + val analysisResult = TopDownAnalyzerFacadeForJS.analyzeFiles( + ktFiles, myEnvironment.project, myEnvironment.configuration, + moduleDescriptors = listOf(stdlibDescriptor), + friendModuleDescriptors = emptyList(), + CompilerEnvironment, + customBuiltInsModule = stdlibDescriptor + ) + + val (bindingContext, moduleDescriptor) = analysisResult + if (!psi2Ir.configuration.ignoreErrors) { + analysisResult.throwIfError() + AnalyzingUtils.throwExceptionOnErrors(bindingContext) + } + + val symbolTable = SymbolTable(IdSignatureDescriptor(JsManglerDesc), IrFactoryImpl, NameProvider.DEFAULT) + val context = psi2Ir.createGeneratorContext(moduleDescriptor, bindingContext, symbolTable) + val irBuiltIns = context.irBuiltIns + val functionFactory = IrFunctionFactory(irBuiltIns, symbolTable) + val irLinker = JsIrLinker(moduleDescriptor, IrMessageLogger.None, irBuiltIns, symbolTable, functionFactory, null, null) + irLinker.deserializeIrModuleHeader(stdlibDescriptor, stdlib) + + return psi2Ir.generateModuleFragment(context, ktFiles, listOf(irLinker), emptyList(), expectActualSymbols) to bindingContext + } +} + +abstract class AbstractKlibJsTextTestCase : AbstractKlibTextTestCase() \ No newline at end of file diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt index 6fc481645a9..b0116c608f5 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt @@ -32,9 +32,7 @@ import org.jetbrains.kotlin.generators.impl.generateTestGroupSuite import org.jetbrains.kotlin.generators.util.TestGeneratorUtil.KT_OR_KTS_WITHOUT_DOTS_IN_NAME import org.jetbrains.kotlin.generators.util.TestGeneratorUtil.KT_WITHOUT_DOTS_IN_NAME import org.jetbrains.kotlin.integration.AbstractAntTaskTest -import org.jetbrains.kotlin.ir.AbstractIrCfgTestCase -import org.jetbrains.kotlin.ir.AbstractIrJsTextTestCase -import org.jetbrains.kotlin.ir.AbstractIrSourceRangesTestCase +import org.jetbrains.kotlin.ir.* import org.jetbrains.kotlin.jvm.compiler.* import org.jetbrains.kotlin.jvm.compiler.ir.AbstractIrCompileJavaAgainstKotlinTest import org.jetbrains.kotlin.jvm.compiler.ir.AbstractIrCompileKotlinAgainstJavaTest @@ -138,6 +136,14 @@ fun generateJUnit3CompilerTests(args: Array) { model("ir/irJsText", pattern = "^(.+)\\.kt(s)?\$") } + testClass { + model("ir/irJsText", pattern = "^(.+)\\.kt\$", targetBackend = TargetBackend.JS_IR) + } + + testClass { + model("ir/irText", pattern = "^(.+)\\.kt\$", targetBackend = TargetBackend.JS_IR) + } + testClass { model("ir/irCfg") } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/ir/KlibJsTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/ir/KlibJsTextTestCaseGenerated.java new file mode 100644 index 00000000000..7362724dfa4 --- /dev/null +++ b/compiler/tests-gen/org/jetbrains/kotlin/ir/KlibJsTextTestCaseGenerated.java @@ -0,0 +1,204 @@ +/* + * 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.ir; + +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 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/ir/irJsText") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class KlibJsTextTestCaseGenerated extends AbstractKlibJsTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInIrJsText() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/ir/irJsText/dynamic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Dynamic extends AbstractKlibJsTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInDynamic() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText/dynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("dynamicAndMembersOfAny.kt") + public void testDynamicAndMembersOfAny() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicAndMembersOfAny.kt"); + } + + @TestMetadata("dynamicArrayAccess.kt") + public void testDynamicArrayAccess() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicArrayAccess.kt"); + } + + @TestMetadata("dynamicArrayAssignment.kt") + public void testDynamicArrayAssignment() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicArrayAssignment.kt"); + } + + @TestMetadata("dynamicArrayAugmentedAssignment.kt") + public void testDynamicArrayAugmentedAssignment() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicArrayAugmentedAssignment.kt"); + } + + @TestMetadata("dynamicArrayIncrementDecrement.kt") + public void testDynamicArrayIncrementDecrement() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicArrayIncrementDecrement.kt"); + } + + @TestMetadata("dynamicBinaryEqualityOperator.kt") + public void testDynamicBinaryEqualityOperator() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicBinaryEqualityOperator.kt"); + } + + @TestMetadata("dynamicBinaryLogicalOperator.kt") + public void testDynamicBinaryLogicalOperator() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicBinaryLogicalOperator.kt"); + } + + @TestMetadata("dynamicBinaryOperator.kt") + public void testDynamicBinaryOperator() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicBinaryOperator.kt"); + } + + @TestMetadata("dynamicBinaryRelationalOperator.kt") + public void testDynamicBinaryRelationalOperator() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicBinaryRelationalOperator.kt"); + } + + @TestMetadata("dynamicCall.kt") + public void testDynamicCall() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicCall.kt"); + } + + @TestMetadata("dynamicElvisOperator.kt") + public void testDynamicElvisOperator() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicElvisOperator.kt"); + } + + @TestMetadata("dynamicExclExclOperator.kt") + public void testDynamicExclExclOperator() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicExclExclOperator.kt"); + } + + @TestMetadata("dynamicInfixCall.kt") + public void testDynamicInfixCall() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicInfixCall.kt"); + } + + @TestMetadata("dynamicMemberAccess.kt") + public void testDynamicMemberAccess() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicMemberAccess.kt"); + } + + @TestMetadata("dynamicMemberAssignment.kt") + public void testDynamicMemberAssignment() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicMemberAssignment.kt"); + } + + @TestMetadata("dynamicMemberAugmentedAssignment.kt") + public void testDynamicMemberAugmentedAssignment() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicMemberAugmentedAssignment.kt"); + } + + @TestMetadata("dynamicMemberIncrementDecrement.kt") + public void testDynamicMemberIncrementDecrement() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicMemberIncrementDecrement.kt"); + } + + @TestMetadata("dynamicUnaryOperator.kt") + public void testDynamicUnaryOperator() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicUnaryOperator.kt"); + } + + @TestMetadata("dynamicWithSmartCast.kt") + public void testDynamicWithSmartCast() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/dynamicWithSmartCast.kt"); + } + + @TestMetadata("implicitCastFromDynamic.kt") + public void testImplicitCastFromDynamic() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/implicitCastFromDynamic.kt"); + } + + @TestMetadata("implicitCastToDynamic.kt") + public void testImplicitCastToDynamic() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/implicitCastToDynamic.kt"); + } + + @TestMetadata("invokeOperator.kt") + public void testInvokeOperator() throws Exception { + runTest("compiler/testData/ir/irJsText/dynamic/invokeOperator.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irJsText/external") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class External extends AbstractKlibJsTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInExternal() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText/external"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("kt38765.kt") + public void testKt38765() throws Exception { + runTest("compiler/testData/ir/irJsText/external/kt38765.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irJsText/native") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Native extends AbstractKlibJsTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInNative() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText/native"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("nativeNativeKotlin.kt") + public void testNativeNativeKotlin() throws Exception { + runTest("compiler/testData/ir/irJsText/native/nativeNativeKotlin.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irJsText/scripting") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Scripting extends AbstractKlibJsTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInScripting() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText/scripting"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } +} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/ir/KlibTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/ir/KlibTextTestCaseGenerated.java new file mode 100644 index 00000000000..ce92ce3a7e7 --- /dev/null +++ b/compiler/tests-gen/org/jetbrains/kotlin/ir/KlibTextTestCaseGenerated.java @@ -0,0 +1,2030 @@ +/* + * 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.ir; + +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 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/ir/irText") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInIrText() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/ir/irText/classes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Classes extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + @TestMetadata("abstractMembers.kt") + public void testAbstractMembers() throws Exception { + runTest("compiler/testData/ir/irText/classes/abstractMembers.kt"); + } + + public void testAllFilesPresentInClasses() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/classes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("annotationClasses.kt") + public void testAnnotationClasses() throws Exception { + runTest("compiler/testData/ir/irText/classes/annotationClasses.kt"); + } + + @TestMetadata("argumentReorderingInDelegatingConstructorCall.kt") + public void testArgumentReorderingInDelegatingConstructorCall() throws Exception { + runTest("compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.kt"); + } + + @TestMetadata("classMembers.kt") + public void testClassMembers() throws Exception { + runTest("compiler/testData/ir/irText/classes/classMembers.kt"); + } + + @TestMetadata("classes.kt") + public void testClasses() throws Exception { + runTest("compiler/testData/ir/irText/classes/classes.kt"); + } + + @TestMetadata("companionObject.kt") + public void testCompanionObject() throws Exception { + runTest("compiler/testData/ir/irText/classes/companionObject.kt"); + } + + @TestMetadata("dataClassWithArrayMembers.kt") + public void testDataClassWithArrayMembers() throws Exception { + runTest("compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt"); + } + + @TestMetadata("dataClasses.kt") + public void testDataClasses() throws Exception { + runTest("compiler/testData/ir/irText/classes/dataClasses.kt"); + } + + @TestMetadata("dataClassesGeneric.kt") + public void testDataClassesGeneric() throws Exception { + runTest("compiler/testData/ir/irText/classes/dataClassesGeneric.kt"); + } + + @TestMetadata("delegatedGenericImplementation.kt") + public void testDelegatedGenericImplementation() throws Exception { + runTest("compiler/testData/ir/irText/classes/delegatedGenericImplementation.kt"); + } + + @TestMetadata("delegatedImplementation.kt") + public void testDelegatedImplementation() throws Exception { + runTest("compiler/testData/ir/irText/classes/delegatedImplementation.kt"); + } + + @TestMetadata("delegatedImplementationWithExplicitOverride.kt") + public void testDelegatedImplementationWithExplicitOverride() throws Exception { + runTest("compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.kt"); + } + + @TestMetadata("delegatingConstructorCallToTypeAliasConstructor.kt") + public void testDelegatingConstructorCallToTypeAliasConstructor() throws Exception { + runTest("compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.kt"); + } + + @TestMetadata("delegatingConstructorCallsInSecondaryConstructors.kt") + public void testDelegatingConstructorCallsInSecondaryConstructors() throws Exception { + runTest("compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.kt"); + } + + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("compiler/testData/ir/irText/classes/enum.kt"); + } + + @TestMetadata("enumClassModality.kt") + public void testEnumClassModality() throws Exception { + runTest("compiler/testData/ir/irText/classes/enumClassModality.kt"); + } + + @TestMetadata("enumWithMultipleCtors.kt") + public void testEnumWithMultipleCtors() throws Exception { + runTest("compiler/testData/ir/irText/classes/enumWithMultipleCtors.kt"); + } + + @TestMetadata("enumWithSecondaryCtor.kt") + public void testEnumWithSecondaryCtor() throws Exception { + runTest("compiler/testData/ir/irText/classes/enumWithSecondaryCtor.kt"); + } + + @TestMetadata("initBlock.kt") + public void testInitBlock() throws Exception { + runTest("compiler/testData/ir/irText/classes/initBlock.kt"); + } + + @TestMetadata("initVal.kt") + public void testInitVal() throws Exception { + runTest("compiler/testData/ir/irText/classes/initVal.kt"); + } + + @TestMetadata("initValInLambda.kt") + public void testInitValInLambda() throws Exception { + runTest("compiler/testData/ir/irText/classes/initValInLambda.kt"); + } + + @TestMetadata("initVar.kt") + public void testInitVar() throws Exception { + runTest("compiler/testData/ir/irText/classes/initVar.kt"); + } + + @TestMetadata("inlineClass.kt") + public void testInlineClass() throws Exception { + runTest("compiler/testData/ir/irText/classes/inlineClass.kt"); + } + + @TestMetadata("inlineClassSyntheticMethods.kt") + public void testInlineClassSyntheticMethods() throws Exception { + runTest("compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt"); + } + + @TestMetadata("innerClass.kt") + public void testInnerClass() throws Exception { + runTest("compiler/testData/ir/irText/classes/innerClass.kt"); + } + + @TestMetadata("innerClassWithDelegatingConstructor.kt") + public void testInnerClassWithDelegatingConstructor() throws Exception { + runTest("compiler/testData/ir/irText/classes/innerClassWithDelegatingConstructor.kt"); + } + + @TestMetadata("kt19306.kt") + public void testKt19306() throws Exception { + runTest("compiler/testData/ir/irText/classes/kt19306.kt"); + } + + @TestMetadata("kt31649.kt") + public void testKt31649() throws Exception { + runTest("compiler/testData/ir/irText/classes/kt31649.kt"); + } + + @TestMetadata("lambdaInDataClassDefaultParameter.kt") + public void testLambdaInDataClassDefaultParameter() throws Exception { + runTest("compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt"); + } + + @TestMetadata("localClasses.kt") + public void testLocalClasses() throws Exception { + runTest("compiler/testData/ir/irText/classes/localClasses.kt"); + } + + @TestMetadata("objectLiteralExpressions.kt") + public void testObjectLiteralExpressions() throws Exception { + runTest("compiler/testData/ir/irText/classes/objectLiteralExpressions.kt"); + } + + @TestMetadata("objectWithInitializers.kt") + public void testObjectWithInitializers() throws Exception { + runTest("compiler/testData/ir/irText/classes/objectWithInitializers.kt"); + } + + @TestMetadata("openDataClass.kt") + public void testOpenDataClass() throws Exception { + runTest("compiler/testData/ir/irText/classes/openDataClass.kt"); + } + + @TestMetadata("outerClassAccess.kt") + public void testOuterClassAccess() throws Exception { + runTest("compiler/testData/ir/irText/classes/outerClassAccess.kt"); + } + + @TestMetadata("primaryConstructor.kt") + public void testPrimaryConstructor() throws Exception { + runTest("compiler/testData/ir/irText/classes/primaryConstructor.kt"); + } + + @TestMetadata("primaryConstructorWithSuperConstructorCall.kt") + public void testPrimaryConstructorWithSuperConstructorCall() throws Exception { + runTest("compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.kt"); + } + + @TestMetadata("qualifiedSuperCalls.kt") + public void testQualifiedSuperCalls() throws Exception { + runTest("compiler/testData/ir/irText/classes/qualifiedSuperCalls.kt"); + } + + @TestMetadata("sealedClasses.kt") + public void testSealedClasses() throws Exception { + runTest("compiler/testData/ir/irText/classes/sealedClasses.kt"); + } + + @TestMetadata("secondaryConstructorWithInitializersFromClassBody.kt") + public void testSecondaryConstructorWithInitializersFromClassBody() throws Exception { + runTest("compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.kt"); + } + + @TestMetadata("secondaryConstructors.kt") + public void testSecondaryConstructors() throws Exception { + runTest("compiler/testData/ir/irText/classes/secondaryConstructors.kt"); + } + + @TestMetadata("superCalls.kt") + public void testSuperCalls() throws Exception { + runTest("compiler/testData/ir/irText/classes/superCalls.kt"); + } + + @TestMetadata("superCallsComposed.kt") + public void testSuperCallsComposed() throws Exception { + runTest("compiler/testData/ir/irText/classes/superCallsComposed.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irText/declarations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Declarations extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInDeclarations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("catchParameterInTopLevelProperty.kt") + public void testCatchParameterInTopLevelProperty() throws Exception { + runTest("compiler/testData/ir/irText/declarations/catchParameterInTopLevelProperty.kt"); + } + + @TestMetadata("classLevelProperties.kt") + public void testClassLevelProperties() throws Exception { + runTest("compiler/testData/ir/irText/declarations/classLevelProperties.kt"); + } + + @TestMetadata("constValInitializers.kt") + public void testConstValInitializers() throws Exception { + runTest("compiler/testData/ir/irText/declarations/constValInitializers.kt"); + } + + @TestMetadata("defaultArguments.kt") + public void testDefaultArguments() throws Exception { + runTest("compiler/testData/ir/irText/declarations/defaultArguments.kt"); + } + + @TestMetadata("delegatedProperties.kt") + public void testDelegatedProperties() throws Exception { + runTest("compiler/testData/ir/irText/declarations/delegatedProperties.kt"); + } + + @TestMetadata("deprecatedProperty.kt") + public void testDeprecatedProperty() throws Exception { + runTest("compiler/testData/ir/irText/declarations/deprecatedProperty.kt"); + } + + @TestMetadata("extensionProperties.kt") + public void testExtensionProperties() throws Exception { + runTest("compiler/testData/ir/irText/declarations/extensionProperties.kt"); + } + + @TestMetadata("fakeOverrides.kt") + public void testFakeOverrides() throws Exception { + runTest("compiler/testData/ir/irText/declarations/fakeOverrides.kt"); + } + + @TestMetadata("fileWithTypeAliasesOnly.kt") + public void testFileWithTypeAliasesOnly() throws Exception { + runTest("compiler/testData/ir/irText/declarations/fileWithTypeAliasesOnly.kt"); + } + + @TestMetadata("genericDelegatedProperty.kt") + public void testGenericDelegatedProperty() throws Exception { + runTest("compiler/testData/ir/irText/declarations/genericDelegatedProperty.kt"); + } + + @TestMetadata("inlineCollectionOfInlineClass.kt") + public void testInlineCollectionOfInlineClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.kt"); + } + + @TestMetadata("interfaceProperties.kt") + public void testInterfaceProperties() throws Exception { + runTest("compiler/testData/ir/irText/declarations/interfaceProperties.kt"); + } + + @TestMetadata("kt27005.kt") + public void testKt27005() throws Exception { + runTest("compiler/testData/ir/irText/declarations/kt27005.kt"); + } + + @TestMetadata("kt35550.kt") + public void testKt35550() throws Exception { + runTest("compiler/testData/ir/irText/declarations/kt35550.kt"); + } + + @TestMetadata("kt45308.kt") + public void testKt45308() throws Exception { + runTest("compiler/testData/ir/irText/declarations/kt45308.kt"); + } + + @TestMetadata("localClassWithOverrides.kt") + public void testLocalClassWithOverrides() throws Exception { + runTest("compiler/testData/ir/irText/declarations/localClassWithOverrides.kt"); + } + + @TestMetadata("localDelegatedProperties.kt") + public void testLocalDelegatedProperties() throws Exception { + runTest("compiler/testData/ir/irText/declarations/localDelegatedProperties.kt"); + } + + @TestMetadata("localVarInDoWhile.kt") + public void testLocalVarInDoWhile() throws Exception { + runTest("compiler/testData/ir/irText/declarations/localVarInDoWhile.kt"); + } + + @TestMetadata("packageLevelProperties.kt") + public void testPackageLevelProperties() throws Exception { + runTest("compiler/testData/ir/irText/declarations/packageLevelProperties.kt"); + } + + @TestMetadata("primaryCtorDefaultArguments.kt") + public void testPrimaryCtorDefaultArguments() throws Exception { + runTest("compiler/testData/ir/irText/declarations/primaryCtorDefaultArguments.kt"); + } + + @TestMetadata("primaryCtorProperties.kt") + public void testPrimaryCtorProperties() throws Exception { + runTest("compiler/testData/ir/irText/declarations/primaryCtorProperties.kt"); + } + + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("compiler/testData/ir/irText/declarations/typeAlias.kt"); + } + + @TestMetadata("compiler/testData/ir/irText/declarations/annotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Annotations extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInAnnotations() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/annotations"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("annotationsInAnnotationArguments.kt") + public void testAnnotationsInAnnotationArguments() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.kt"); + } + + @TestMetadata("annotationsOnDelegatedMembers.kt") + public void testAnnotationsOnDelegatedMembers() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/annotationsOnDelegatedMembers.kt"); + } + + @TestMetadata("annotationsWithDefaultParameterValues.kt") + public void testAnnotationsWithDefaultParameterValues() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.kt"); + } + + @TestMetadata("annotationsWithVarargParameters.kt") + public void testAnnotationsWithVarargParameters() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.kt"); + } + + @TestMetadata("arrayInAnnotationArguments.kt") + public void testArrayInAnnotationArguments() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.kt"); + } + + @TestMetadata("classLiteralInAnnotation.kt") + public void testClassLiteralInAnnotation() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/classLiteralInAnnotation.kt"); + } + + @TestMetadata("classesWithAnnotations.kt") + public void testClassesWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.kt"); + } + + @TestMetadata("constExpressionsInAnnotationArguments.kt") + public void testConstExpressionsInAnnotationArguments() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.kt"); + } + + @TestMetadata("constructorsWithAnnotations.kt") + public void testConstructorsWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.kt"); + } + + @TestMetadata("delegateFieldWithAnnotations.kt") + public void testDelegateFieldWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt"); + } + + @TestMetadata("delegatedPropertyAccessorsWithAnnotations.kt") + public void testDelegatedPropertyAccessorsWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.kt"); + } + + @TestMetadata("enumEntriesWithAnnotations.kt") + public void testEnumEntriesWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.kt"); + } + + @TestMetadata("enumsInAnnotationArguments.kt") + public void testEnumsInAnnotationArguments() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.kt"); + } + + @TestMetadata("fieldsWithAnnotations.kt") + public void testFieldsWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.kt"); + } + + @TestMetadata("fileAnnotations.kt") + public void testFileAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/fileAnnotations.kt"); + } + + @TestMetadata("functionsWithAnnotations.kt") + public void testFunctionsWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.kt"); + } + + @TestMetadata("genericAnnotationClasses.kt") + public void testGenericAnnotationClasses() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/genericAnnotationClasses.kt"); + } + + @TestMetadata("inheritingDeprecation.kt") + public void testInheritingDeprecation() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/inheritingDeprecation.kt"); + } + + @TestMetadata("localDelegatedPropertiesWithAnnotations.kt") + public void testLocalDelegatedPropertiesWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.kt"); + } + + @TestMetadata("multipleAnnotationsInSquareBrackets.kt") + public void testMultipleAnnotationsInSquareBrackets() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.kt"); + } + + @TestMetadata("primaryConstructorParameterWithAnnotations.kt") + public void testPrimaryConstructorParameterWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.kt"); + } + + @TestMetadata("propertiesWithAnnotations.kt") + public void testPropertiesWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.kt"); + } + + @TestMetadata("propertyAccessorsFromClassHeaderWithAnnotations.kt") + public void testPropertyAccessorsFromClassHeaderWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.kt"); + } + + @TestMetadata("propertyAccessorsWithAnnotations.kt") + public void testPropertyAccessorsWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.kt"); + } + + @TestMetadata("propertySetterParameterWithAnnotations.kt") + public void testPropertySetterParameterWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.kt"); + } + + @TestMetadata("receiverParameterWithAnnotations.kt") + public void testReceiverParameterWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.kt"); + } + + @TestMetadata("spreadOperatorInAnnotationArguments.kt") + public void testSpreadOperatorInAnnotationArguments() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.kt"); + } + + @TestMetadata("typeAliasesWithAnnotations.kt") + public void testTypeAliasesWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.kt"); + } + + @TestMetadata("typeParametersWithAnnotations.kt") + public void testTypeParametersWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.kt"); + } + + @TestMetadata("valueParametersWithAnnotations.kt") + public void testValueParametersWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.kt"); + } + + @TestMetadata("varargsInAnnotationArguments.kt") + public void testVarargsInAnnotationArguments() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.kt"); + } + + @TestMetadata("variablesWithAnnotations.kt") + public void testVariablesWithAnnotations() throws Exception { + runTest("compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Multiplatform extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInMultiplatform() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("expectClassInherited.kt") + public void testExpectClassInherited() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/expectClassInherited.kt"); + } + + @TestMetadata("expectedEnumClass.kt") + public void testExpectedEnumClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.kt"); + } + + @TestMetadata("expectedSealedClass.kt") + public void testExpectedSealedClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irText/declarations/parameters") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Parameters extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/parameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("class.kt") + public void testClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/class.kt"); + } + + @TestMetadata("constructor.kt") + public void testConstructor() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/constructor.kt"); + } + + @TestMetadata("dataClassMembers.kt") + public void testDataClassMembers() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt"); + } + + @TestMetadata("defaultPropertyAccessors.kt") + public void testDefaultPropertyAccessors() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/defaultPropertyAccessors.kt"); + } + + @TestMetadata("delegatedMembers.kt") + public void testDelegatedMembers() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/delegatedMembers.kt"); + } + + @TestMetadata("fun.kt") + public void testFun() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/fun.kt"); + } + + @TestMetadata("genericInnerClass.kt") + public void testGenericInnerClass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/genericInnerClass.kt"); + } + + @TestMetadata("lambdas.kt") + public void testLambdas() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/lambdas.kt"); + } + + @TestMetadata("localFun.kt") + public void testLocalFun() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/localFun.kt"); + } + + @TestMetadata("propertyAccessors.kt") + public void testPropertyAccessors() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/propertyAccessors.kt"); + } + + @TestMetadata("typeParameterBeforeBound.kt") + public void testTypeParameterBeforeBound() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/typeParameterBeforeBound.kt"); + } + + @TestMetadata("typeParameterBoundedBySubclass.kt") + public void testTypeParameterBoundedBySubclass() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/typeParameterBoundedBySubclass.kt"); + } + + @TestMetadata("useNextParamInLambda.kt") + public void testUseNextParamInLambda() throws Exception { + runTest("compiler/testData/ir/irText/declarations/parameters/useNextParamInLambda.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irText/declarations/provideDelegate") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProvideDelegate extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInProvideDelegate() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/declarations/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("differentReceivers.kt") + public void testDifferentReceivers() throws Exception { + runTest("compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.kt"); + } + + @TestMetadata("local.kt") + public void testLocal() throws Exception { + runTest("compiler/testData/ir/irText/declarations/provideDelegate/local.kt"); + } + + @TestMetadata("localDifferentReceivers.kt") + public void testLocalDifferentReceivers() throws Exception { + runTest("compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt"); + } + + @TestMetadata("member.kt") + public void testMember() throws Exception { + runTest("compiler/testData/ir/irText/declarations/provideDelegate/member.kt"); + } + + @TestMetadata("memberExtension.kt") + public void testMemberExtension() throws Exception { + runTest("compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.kt"); + } + + @TestMetadata("topLevel.kt") + public void testTopLevel() throws Exception { + runTest("compiler/testData/ir/irText/declarations/provideDelegate/topLevel.kt"); + } + } + } + + @TestMetadata("compiler/testData/ir/irText/errors") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Errors extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInErrors() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/errors"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("suppressedNonPublicCall.kt") + public void testSuppressedNonPublicCall() throws Exception { + runTest("compiler/testData/ir/irText/errors/suppressedNonPublicCall.kt"); + } + + @TestMetadata("unresolvedReference.kt") + public void testUnresolvedReference() throws Exception { + runTest("compiler/testData/ir/irText/errors/unresolvedReference.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irText/expressions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expressions extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInExpressions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("argumentMappedWithError.kt") + public void testArgumentMappedWithError() throws Exception { + runTest("compiler/testData/ir/irText/expressions/argumentMappedWithError.kt"); + } + + @TestMetadata("arrayAccess.kt") + public void testArrayAccess() throws Exception { + runTest("compiler/testData/ir/irText/expressions/arrayAccess.kt"); + } + + @TestMetadata("arrayAssignment.kt") + public void testArrayAssignment() throws Exception { + runTest("compiler/testData/ir/irText/expressions/arrayAssignment.kt"); + } + + @TestMetadata("arrayAugmentedAssignment1.kt") + public void testArrayAugmentedAssignment1() throws Exception { + runTest("compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.kt"); + } + + @TestMetadata("arrayAugmentedAssignment2.kt") + public void testArrayAugmentedAssignment2() throws Exception { + runTest("compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.kt"); + } + + @TestMetadata("assignments.kt") + public void testAssignments() throws Exception { + runTest("compiler/testData/ir/irText/expressions/assignments.kt"); + } + + @TestMetadata("augmentedAssignment1.kt") + public void testAugmentedAssignment1() throws Exception { + runTest("compiler/testData/ir/irText/expressions/augmentedAssignment1.kt"); + } + + @TestMetadata("augmentedAssignment2.kt") + public void testAugmentedAssignment2() throws Exception { + runTest("compiler/testData/ir/irText/expressions/augmentedAssignment2.kt"); + } + + @TestMetadata("augmentedAssignmentWithExpression.kt") + public void testAugmentedAssignmentWithExpression() throws Exception { + runTest("compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.kt"); + } + + @TestMetadata("badBreakContinue.kt") + public void testBadBreakContinue() throws Exception { + runTest("compiler/testData/ir/irText/expressions/badBreakContinue.kt"); + } + + @TestMetadata("bangbang.kt") + public void testBangbang() throws Exception { + runTest("compiler/testData/ir/irText/expressions/bangbang.kt"); + } + + @TestMetadata("booleanConstsInAndAndOrOr.kt") + public void testBooleanConstsInAndAndOrOr() throws Exception { + runTest("compiler/testData/ir/irText/expressions/booleanConstsInAndAndOrOr.kt"); + } + + @TestMetadata("booleanOperators.kt") + public void testBooleanOperators() throws Exception { + runTest("compiler/testData/ir/irText/expressions/booleanOperators.kt"); + } + + @TestMetadata("boundCallableReferences.kt") + public void testBoundCallableReferences() throws Exception { + runTest("compiler/testData/ir/irText/expressions/boundCallableReferences.kt"); + } + + @TestMetadata("boxOk.kt") + public void testBoxOk() throws Exception { + runTest("compiler/testData/ir/irText/expressions/boxOk.kt"); + } + + @TestMetadata("breakContinue.kt") + public void testBreakContinue() throws Exception { + runTest("compiler/testData/ir/irText/expressions/breakContinue.kt"); + } + + @TestMetadata("breakContinueInLoopHeader.kt") + public void testBreakContinueInLoopHeader() throws Exception { + runTest("compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.kt"); + } + + @TestMetadata("breakContinueInWhen.kt") + public void testBreakContinueInWhen() throws Exception { + runTest("compiler/testData/ir/irText/expressions/breakContinueInWhen.kt"); + } + + @TestMetadata("callWithReorderedArguments.kt") + public void testCallWithReorderedArguments() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callWithReorderedArguments.kt"); + } + + @TestMetadata("calls.kt") + public void testCalls() throws Exception { + runTest("compiler/testData/ir/irText/expressions/calls.kt"); + } + + @TestMetadata("castToTypeParameter.kt") + public void testCastToTypeParameter() throws Exception { + runTest("compiler/testData/ir/irText/expressions/castToTypeParameter.kt"); + } + + @TestMetadata("catchParameterAccess.kt") + public void testCatchParameterAccess() throws Exception { + runTest("compiler/testData/ir/irText/expressions/catchParameterAccess.kt"); + } + + @TestMetadata("chainOfSafeCalls.kt") + public void testChainOfSafeCalls() throws Exception { + runTest("compiler/testData/ir/irText/expressions/chainOfSafeCalls.kt"); + } + + @TestMetadata("complexAugmentedAssignment.kt") + public void testComplexAugmentedAssignment() throws Exception { + runTest("compiler/testData/ir/irText/expressions/complexAugmentedAssignment.kt"); + } + + @TestMetadata("contructorCall.kt") + public void testContructorCall() throws Exception { + runTest("compiler/testData/ir/irText/expressions/contructorCall.kt"); + } + + @TestMetadata("conventionComparisons.kt") + public void testConventionComparisons() throws Exception { + runTest("compiler/testData/ir/irText/expressions/conventionComparisons.kt"); + } + + @TestMetadata("destructuring1.kt") + public void testDestructuring1() throws Exception { + runTest("compiler/testData/ir/irText/expressions/destructuring1.kt"); + } + + @TestMetadata("destructuringWithUnderscore.kt") + public void testDestructuringWithUnderscore() throws Exception { + runTest("compiler/testData/ir/irText/expressions/destructuringWithUnderscore.kt"); + } + + @TestMetadata("dotQualified.kt") + public void testDotQualified() throws Exception { + runTest("compiler/testData/ir/irText/expressions/dotQualified.kt"); + } + + @TestMetadata("elvis.kt") + public void testElvis() throws Exception { + runTest("compiler/testData/ir/irText/expressions/elvis.kt"); + } + + @TestMetadata("enumEntryAsReceiver.kt") + public void testEnumEntryAsReceiver() throws Exception { + runTest("compiler/testData/ir/irText/expressions/enumEntryAsReceiver.kt"); + } + + @TestMetadata("enumEntryReferenceFromEnumEntryClass.kt") + public void testEnumEntryReferenceFromEnumEntryClass() throws Exception { + runTest("compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.kt"); + } + + @TestMetadata("equality.kt") + public void testEquality() throws Exception { + runTest("compiler/testData/ir/irText/expressions/equality.kt"); + } + + @TestMetadata("exhaustiveWhenElseBranch.kt") + public void testExhaustiveWhenElseBranch() throws Exception { + runTest("compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.kt"); + } + + @TestMetadata("extFunInvokeAsFun.kt") + public void testExtFunInvokeAsFun() throws Exception { + runTest("compiler/testData/ir/irText/expressions/extFunInvokeAsFun.kt"); + } + + @TestMetadata("extFunSafeInvoke.kt") + public void testExtFunSafeInvoke() throws Exception { + runTest("compiler/testData/ir/irText/expressions/extFunSafeInvoke.kt"); + } + + @TestMetadata("extensionPropertyGetterCall.kt") + public void testExtensionPropertyGetterCall() throws Exception { + runTest("compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.kt"); + } + + @TestMetadata("field.kt") + public void testField() throws Exception { + runTest("compiler/testData/ir/irText/expressions/field.kt"); + } + + @TestMetadata("for.kt") + public void testFor() throws Exception { + runTest("compiler/testData/ir/irText/expressions/for.kt"); + } + + @TestMetadata("forWithBreakContinue.kt") + public void testForWithBreakContinue() throws Exception { + runTest("compiler/testData/ir/irText/expressions/forWithBreakContinue.kt"); + } + + @TestMetadata("forWithImplicitReceivers.kt") + public void testForWithImplicitReceivers() throws Exception { + runTest("compiler/testData/ir/irText/expressions/forWithImplicitReceivers.kt"); + } + + @TestMetadata("funImportedFromObject.kt") + public void testFunImportedFromObject() throws Exception { + runTest("compiler/testData/ir/irText/expressions/funImportedFromObject.kt"); + } + + @TestMetadata("genericConstructorCallWithTypeArguments.kt") + public void testGenericConstructorCallWithTypeArguments() throws Exception { + runTest("compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt"); + } + + @TestMetadata("genericPropertyCall.kt") + public void testGenericPropertyCall() throws Exception { + runTest("compiler/testData/ir/irText/expressions/genericPropertyCall.kt"); + } + + @TestMetadata("genericPropertyRef.kt") + public void testGenericPropertyRef() throws Exception { + runTest("compiler/testData/ir/irText/expressions/genericPropertyRef.kt"); + } + + @TestMetadata("identity.kt") + public void testIdentity() throws Exception { + runTest("compiler/testData/ir/irText/expressions/identity.kt"); + } + + @TestMetadata("ifElseIf.kt") + public void testIfElseIf() throws Exception { + runTest("compiler/testData/ir/irText/expressions/ifElseIf.kt"); + } + + @TestMetadata("implicitCastInReturnFromConstructor.kt") + public void testImplicitCastInReturnFromConstructor() throws Exception { + runTest("compiler/testData/ir/irText/expressions/implicitCastInReturnFromConstructor.kt"); + } + + @TestMetadata("implicitCastToNonNull.kt") + public void testImplicitCastToNonNull() throws Exception { + runTest("compiler/testData/ir/irText/expressions/implicitCastToNonNull.kt"); + } + + @TestMetadata("implicitCastToTypeParameter.kt") + public void testImplicitCastToTypeParameter() throws Exception { + runTest("compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.kt"); + } + + @TestMetadata("in.kt") + public void testIn() throws Exception { + runTest("compiler/testData/ir/irText/expressions/in.kt"); + } + + @TestMetadata("incrementDecrement.kt") + public void testIncrementDecrement() throws Exception { + runTest("compiler/testData/ir/irText/expressions/incrementDecrement.kt"); + } + + @TestMetadata("interfaceThisRef.kt") + public void testInterfaceThisRef() throws Exception { + runTest("compiler/testData/ir/irText/expressions/interfaceThisRef.kt"); + } + + @TestMetadata("kt16905.kt") + public void testKt16905() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt16905.kt"); + } + + @TestMetadata("kt23030.kt") + public void testKt23030() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt23030.kt"); + } + + @TestMetadata("kt24804.kt") + public void testKt24804() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt24804.kt"); + } + + @TestMetadata("kt27933.kt") + public void testKt27933() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt27933.kt"); + } + + @TestMetadata("kt28006.kt") + public void testKt28006() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt28006.kt"); + } + + @TestMetadata("kt28456.kt") + public void testKt28456() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt28456.kt"); + } + + @TestMetadata("kt28456a.kt") + public void testKt28456a() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt28456a.kt"); + } + + @TestMetadata("kt28456b.kt") + public void testKt28456b() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt28456b.kt"); + } + + @TestMetadata("kt30020.kt") + public void testKt30020() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt30020.kt"); + } + + @TestMetadata("kt30796.kt") + public void testKt30796() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt30796.kt"); + } + + @TestMetadata("kt35730.kt") + public void testKt35730() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt35730.kt"); + } + + @TestMetadata("kt36956.kt") + public void testKt36956() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt36956.kt"); + } + + @TestMetadata("kt36963.kt") + public void testKt36963() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt36963.kt"); + } + + @TestMetadata("kt37570.kt") + public void testKt37570() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt37570.kt"); + } + + @TestMetadata("kt37779.kt") + public void testKt37779() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt37779.kt"); + } + + @TestMetadata("kt42321.kt") + public void testKt42321() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt42321.kt"); + } + + @TestMetadata("kt45022.kt") + public void testKt45022() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt45022.kt"); + } + + @TestMetadata("kt47245.kt") + public void testKt47245() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt47245.kt"); + } + + @TestMetadata("lambdaInCAO.kt") + public void testLambdaInCAO() throws Exception { + runTest("compiler/testData/ir/irText/expressions/lambdaInCAO.kt"); + } + + @TestMetadata("literals.kt") + public void testLiterals() throws Exception { + runTest("compiler/testData/ir/irText/expressions/literals.kt"); + } + + @TestMetadata("memberTypeArguments.kt") + public void testMemberTypeArguments() throws Exception { + runTest("compiler/testData/ir/irText/expressions/memberTypeArguments.kt"); + } + + @TestMetadata("membersImportedFromObject.kt") + public void testMembersImportedFromObject() throws Exception { + runTest("compiler/testData/ir/irText/expressions/membersImportedFromObject.kt"); + } + + @TestMetadata("multipleSmartCasts.kt") + public void testMultipleSmartCasts() throws Exception { + runTest("compiler/testData/ir/irText/expressions/multipleSmartCasts.kt"); + } + + @TestMetadata("multipleThisReferences.kt") + public void testMultipleThisReferences() throws Exception { + runTest("compiler/testData/ir/irText/expressions/multipleThisReferences.kt"); + } + + @TestMetadata("objectAsCallable.kt") + public void testObjectAsCallable() throws Exception { + runTest("compiler/testData/ir/irText/expressions/objectAsCallable.kt"); + } + + @TestMetadata("objectByNameInsideObject.kt") + public void testObjectByNameInsideObject() throws Exception { + runTest("compiler/testData/ir/irText/expressions/objectByNameInsideObject.kt"); + } + + @TestMetadata("objectReference.kt") + public void testObjectReference() throws Exception { + runTest("compiler/testData/ir/irText/expressions/objectReference.kt"); + } + + @TestMetadata("objectReferenceInClosureInSuperConstructorCall.kt") + public void testObjectReferenceInClosureInSuperConstructorCall() throws Exception { + runTest("compiler/testData/ir/irText/expressions/objectReferenceInClosureInSuperConstructorCall.kt"); + } + + @TestMetadata("objectReferenceInFieldInitializer.kt") + public void testObjectReferenceInFieldInitializer() throws Exception { + runTest("compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.kt"); + } + + @TestMetadata("outerClassInstanceReference.kt") + public void testOuterClassInstanceReference() throws Exception { + runTest("compiler/testData/ir/irText/expressions/outerClassInstanceReference.kt"); + } + + @TestMetadata("primitiveComparisons.kt") + public void testPrimitiveComparisons() throws Exception { + runTest("compiler/testData/ir/irText/expressions/primitiveComparisons.kt"); + } + + @TestMetadata("primitivesImplicitConversions.kt") + public void testPrimitivesImplicitConversions() throws Exception { + runTest("compiler/testData/ir/irText/expressions/primitivesImplicitConversions.kt"); + } + + @TestMetadata("references.kt") + public void testReferences() throws Exception { + runTest("compiler/testData/ir/irText/expressions/references.kt"); + } + + @TestMetadata("reflectionLiterals.kt") + public void testReflectionLiterals() throws Exception { + runTest("compiler/testData/ir/irText/expressions/reflectionLiterals.kt"); + } + + @TestMetadata("safeAssignment.kt") + public void testSafeAssignment() throws Exception { + runTest("compiler/testData/ir/irText/expressions/safeAssignment.kt"); + } + + @TestMetadata("safeCallWithIncrementDecrement.kt") + public void testSafeCallWithIncrementDecrement() throws Exception { + runTest("compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.kt"); + } + + @TestMetadata("safeCalls.kt") + public void testSafeCalls() throws Exception { + runTest("compiler/testData/ir/irText/expressions/safeCalls.kt"); + } + + @TestMetadata("signedToUnsignedConversions.kt") + public void testSignedToUnsignedConversions() throws Exception { + runTest("compiler/testData/ir/irText/expressions/signedToUnsignedConversions.kt"); + } + + @TestMetadata("simpleOperators.kt") + public void testSimpleOperators() throws Exception { + runTest("compiler/testData/ir/irText/expressions/simpleOperators.kt"); + } + + @TestMetadata("simpleUnaryOperators.kt") + public void testSimpleUnaryOperators() throws Exception { + runTest("compiler/testData/ir/irText/expressions/simpleUnaryOperators.kt"); + } + + @TestMetadata("smartCasts.kt") + public void testSmartCasts() throws Exception { + runTest("compiler/testData/ir/irText/expressions/smartCasts.kt"); + } + + @TestMetadata("smartCastsWithDestructuring.kt") + public void testSmartCastsWithDestructuring() throws Exception { + runTest("compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.kt"); + } + + @TestMetadata("specializedTypeAliasConstructorCall.kt") + public void testSpecializedTypeAliasConstructorCall() throws Exception { + runTest("compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.kt"); + } + + @TestMetadata("stringComparisons.kt") + public void testStringComparisons() throws Exception { + runTest("compiler/testData/ir/irText/expressions/stringComparisons.kt"); + } + + @TestMetadata("stringPlus.kt") + public void testStringPlus() throws Exception { + runTest("compiler/testData/ir/irText/expressions/stringPlus.kt"); + } + + @TestMetadata("stringTemplates.kt") + public void testStringTemplates() throws Exception { + runTest("compiler/testData/ir/irText/expressions/stringTemplates.kt"); + } + + @TestMetadata("suspendConversionOnArbitraryExpression.kt") + public void testSuspendConversionOnArbitraryExpression() throws Exception { + runTest("compiler/testData/ir/irText/expressions/suspendConversionOnArbitraryExpression.kt"); + } + + @TestMetadata("temporaryInEnumEntryInitializer.kt") + public void testTemporaryInEnumEntryInitializer() throws Exception { + runTest("compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.kt"); + } + + @TestMetadata("temporaryInInitBlock.kt") + public void testTemporaryInInitBlock() throws Exception { + runTest("compiler/testData/ir/irText/expressions/temporaryInInitBlock.kt"); + } + + @TestMetadata("thisOfGenericOuterClass.kt") + public void testThisOfGenericOuterClass() throws Exception { + runTest("compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt"); + } + + @TestMetadata("thisRefToObjectInNestedClassConstructorCall.kt") + public void testThisRefToObjectInNestedClassConstructorCall() throws Exception { + runTest("compiler/testData/ir/irText/expressions/thisRefToObjectInNestedClassConstructorCall.kt"); + } + + @TestMetadata("thisReferenceBeforeClassDeclared.kt") + public void testThisReferenceBeforeClassDeclared() throws Exception { + runTest("compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt"); + } + + @TestMetadata("throw.kt") + public void testThrow() throws Exception { + runTest("compiler/testData/ir/irText/expressions/throw.kt"); + } + + @TestMetadata("tryCatch.kt") + public void testTryCatch() throws Exception { + runTest("compiler/testData/ir/irText/expressions/tryCatch.kt"); + } + + @TestMetadata("tryCatchWithImplicitCast.kt") + public void testTryCatchWithImplicitCast() throws Exception { + runTest("compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.kt"); + } + + @TestMetadata("typeAliasConstructorReference.kt") + public void testTypeAliasConstructorReference() throws Exception { + runTest("compiler/testData/ir/irText/expressions/typeAliasConstructorReference.kt"); + } + + @TestMetadata("typeOperators.kt") + public void testTypeOperators() throws Exception { + runTest("compiler/testData/ir/irText/expressions/typeOperators.kt"); + } + + @TestMetadata("typeParameterClassLiteral.kt") + public void testTypeParameterClassLiteral() throws Exception { + runTest("compiler/testData/ir/irText/expressions/typeParameterClassLiteral.kt"); + } + + @TestMetadata("unsignedIntegerLiterals.kt") + public void testUnsignedIntegerLiterals() throws Exception { + runTest("compiler/testData/ir/irText/expressions/unsignedIntegerLiterals.kt"); + } + + @TestMetadata("useImportedMember.kt") + public void testUseImportedMember() throws Exception { + runTest("compiler/testData/ir/irText/expressions/useImportedMember.kt"); + } + + @TestMetadata("values.kt") + public void testValues() throws Exception { + runTest("compiler/testData/ir/irText/expressions/values.kt"); + } + + @TestMetadata("vararg.kt") + public void testVararg() throws Exception { + runTest("compiler/testData/ir/irText/expressions/vararg.kt"); + } + + @TestMetadata("varargWithImplicitCast.kt") + public void testVarargWithImplicitCast() throws Exception { + runTest("compiler/testData/ir/irText/expressions/varargWithImplicitCast.kt"); + } + + @TestMetadata("variableAsFunctionCall.kt") + public void testVariableAsFunctionCall() throws Exception { + runTest("compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt"); + } + + @TestMetadata("variableAsFunctionCallWithGenerics.kt") + public void testVariableAsFunctionCallWithGenerics() throws Exception { + runTest("compiler/testData/ir/irText/expressions/variableAsFunctionCallWithGenerics.kt"); + } + + @TestMetadata("when.kt") + public void testWhen() throws Exception { + runTest("compiler/testData/ir/irText/expressions/when.kt"); + } + + @TestMetadata("whenCoercedToUnit.kt") + public void testWhenCoercedToUnit() throws Exception { + runTest("compiler/testData/ir/irText/expressions/whenCoercedToUnit.kt"); + } + + @TestMetadata("whenElse.kt") + public void testWhenElse() throws Exception { + runTest("compiler/testData/ir/irText/expressions/whenElse.kt"); + } + + @TestMetadata("whenReturn.kt") + public void testWhenReturn() throws Exception { + runTest("compiler/testData/ir/irText/expressions/whenReturn.kt"); + } + + @TestMetadata("whenReturnUnit.kt") + public void testWhenReturnUnit() throws Exception { + runTest("compiler/testData/ir/irText/expressions/whenReturnUnit.kt"); + } + + @TestMetadata("whenSmartCastToEnum.kt") + public void testWhenSmartCastToEnum() throws Exception { + runTest("compiler/testData/ir/irText/expressions/whenSmartCastToEnum.kt"); + } + + @TestMetadata("whenUnusedExpression.kt") + public void testWhenUnusedExpression() throws Exception { + runTest("compiler/testData/ir/irText/expressions/whenUnusedExpression.kt"); + } + + @TestMetadata("whenWithSubjectVariable.kt") + public void testWhenWithSubjectVariable() throws Exception { + runTest("compiler/testData/ir/irText/expressions/whenWithSubjectVariable.kt"); + } + + @TestMetadata("whileDoWhile.kt") + public void testWhileDoWhile() throws Exception { + runTest("compiler/testData/ir/irText/expressions/whileDoWhile.kt"); + } + + @TestMetadata("compiler/testData/ir/irText/expressions/callableReferences") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CallableReferences extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + @TestMetadata("adaptedExtensionFunctions.kt") + public void testAdaptedExtensionFunctions() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/adaptedExtensionFunctions.kt"); + } + + @TestMetadata("adaptedWithCoercionToUnit.kt") + public void testAdaptedWithCoercionToUnit() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/adaptedWithCoercionToUnit.kt"); + } + + public void testAllFilesPresentInCallableReferences() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/callableReferences"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("boundInlineAdaptedReference.kt") + public void testBoundInlineAdaptedReference() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/boundInlineAdaptedReference.kt"); + } + + @TestMetadata("boundInnerGenericConstructor.kt") + public void testBoundInnerGenericConstructor() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.kt"); + } + + @TestMetadata("caoWithAdaptationForSam.kt") + public void testCaoWithAdaptationForSam() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt"); + } + + @TestMetadata("constructorWithAdaptedArguments.kt") + public void testConstructorWithAdaptedArguments() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt"); + } + + @TestMetadata("funWithDefaultParametersAsKCallableStar.kt") + public void testFunWithDefaultParametersAsKCallableStar() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/funWithDefaultParametersAsKCallableStar.kt"); + } + + @TestMetadata("genericLocalClassConstructorReference.kt") + public void testGenericLocalClassConstructorReference() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/genericLocalClassConstructorReference.kt"); + } + + @TestMetadata("genericMember.kt") + public void testGenericMember() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/genericMember.kt"); + } + + @TestMetadata("importedFromObject.kt") + public void testImportedFromObject() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/importedFromObject.kt"); + } + + @TestMetadata("kt37131.kt") + public void testKt37131() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt"); + } + + @TestMetadata("kt46069.kt") + public void testKt46069() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/kt46069.kt"); + } + + @TestMetadata("suspendConversion.kt") + public void testSuspendConversion() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/suspendConversion.kt"); + } + + @TestMetadata("typeArguments.kt") + public void testTypeArguments() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/typeArguments.kt"); + } + + @TestMetadata("unboundMemberReferenceWithAdaptedArguments.kt") + public void testUnboundMemberReferenceWithAdaptedArguments() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/unboundMemberReferenceWithAdaptedArguments.kt"); + } + + @TestMetadata("varargFunImportedFromObject.kt") + public void testVarargFunImportedFromObject() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/varargFunImportedFromObject.kt"); + } + + @TestMetadata("withAdaptationForSam.kt") + public void testWithAdaptationForSam() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/withAdaptationForSam.kt"); + } + + @TestMetadata("withAdaptedArguments.kt") + public void testWithAdaptedArguments() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/withAdaptedArguments.kt"); + } + + @TestMetadata("withArgumentAdaptationAndReceiver.kt") + public void testWithArgumentAdaptationAndReceiver() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.kt"); + } + + @TestMetadata("withVarargViewedAsArray.kt") + public void testWithVarargViewedAsArray() throws Exception { + runTest("compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FloatingPointComparisons extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInFloatingPointComparisons() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/floatingPointComparisons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("comparableWithDoubleOrFloat.kt") + public void testComparableWithDoubleOrFloat() throws Exception { + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/comparableWithDoubleOrFloat.kt"); + } + + @TestMetadata("eqeqRhsConditionPossiblyAffectingLhs.kt") + public void testEqeqRhsConditionPossiblyAffectingLhs() throws Exception { + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.kt"); + } + + @TestMetadata("floatingPointCompareTo.kt") + public void testFloatingPointCompareTo() throws Exception { + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.kt"); + } + + @TestMetadata("floatingPointEqeq.kt") + public void testFloatingPointEqeq() throws Exception { + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEqeq.kt"); + } + + @TestMetadata("floatingPointEquals.kt") + public void testFloatingPointEquals() throws Exception { + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.kt"); + } + + @TestMetadata("floatingPointExcleq.kt") + public void testFloatingPointExcleq() throws Exception { + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointExcleq.kt"); + } + + @TestMetadata("floatingPointLess.kt") + public void testFloatingPointLess() throws Exception { + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointLess.kt"); + } + + @TestMetadata("nullableAnyAsIntToDouble.kt") + public void testNullableAnyAsIntToDouble() throws Exception { + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableAnyAsIntToDouble.kt"); + } + + @TestMetadata("nullableFloatingPointEqeq.kt") + public void testNullableFloatingPointEqeq() throws Exception { + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.kt"); + } + + @TestMetadata("typeParameterWithPrimitiveNumericSupertype.kt") + public void testTypeParameterWithPrimitiveNumericSupertype() throws Exception { + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/typeParameterWithPrimitiveNumericSupertype.kt"); + } + + @TestMetadata("whenByFloatingPoint.kt") + public void testWhenByFloatingPoint() throws Exception { + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irText/expressions/funInterface") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FunInterface extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInFunInterface() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/funInterface"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("arrayAsVarargAfterSamArgument_fi.kt") + public void testArrayAsVarargAfterSamArgument_fi() throws Exception { + runTest("compiler/testData/ir/irText/expressions/funInterface/arrayAsVarargAfterSamArgument_fi.kt"); + } + + @TestMetadata("basicFunInterfaceConversion.kt") + public void testBasicFunInterfaceConversion() throws Exception { + runTest("compiler/testData/ir/irText/expressions/funInterface/basicFunInterfaceConversion.kt"); + } + + @TestMetadata("castFromAny.kt") + public void testCastFromAny() throws Exception { + runTest("compiler/testData/ir/irText/expressions/funInterface/castFromAny.kt"); + } + + @TestMetadata("samConversionInVarargs.kt") + public void testSamConversionInVarargs() throws Exception { + runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt"); + } + + @TestMetadata("samConversionInVarargsMixed.kt") + public void testSamConversionInVarargsMixed() throws Exception { + runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargsMixed.kt"); + } + + @TestMetadata("samConversionOnCallableReference.kt") + public void testSamConversionOnCallableReference() throws Exception { + runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionOnCallableReference.kt"); + } + + @TestMetadata("samConversionsWithSmartCasts.kt") + public void testSamConversionsWithSmartCasts() throws Exception { + runTest("compiler/testData/ir/irText/expressions/funInterface/samConversionsWithSmartCasts.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irText/expressions/sam") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Sam extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInSam() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/expressions/sam"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + } + + @TestMetadata("compiler/testData/ir/irText/firProblems") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FirProblems extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + @TestMetadata("AbstractMutableMap.kt") + public void testAbstractMutableMap() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/AbstractMutableMap.kt"); + } + + public void testAllFilesPresentInFirProblems() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/firProblems"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("AnnotationLoader.kt") + public void testAnnotationLoader() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/AnnotationLoader.kt"); + } + + @TestMetadata("ArrayMap.kt") + public void testArrayMap() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/ArrayMap.kt"); + } + + @TestMetadata("candidateSymbol.kt") + public void testCandidateSymbol() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/candidateSymbol.kt"); + } + + @TestMetadata("DeepCopyIrTree.kt") + public void testDeepCopyIrTree() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/DeepCopyIrTree.kt"); + } + + @TestMetadata("deprecated.kt") + public void testDeprecated() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/deprecated.kt"); + } + + @TestMetadata("Fir2IrClassifierStorage.kt") + public void testFir2IrClassifierStorage() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/Fir2IrClassifierStorage.kt"); + } + + @TestMetadata("FirBuilder.kt") + public void testFirBuilder() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/FirBuilder.kt"); + } + + @TestMetadata("ImplicitReceiverStack.kt") + public void testImplicitReceiverStack() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt"); + } + + @TestMetadata("inapplicableCollectionSet.kt") + public void testInapplicableCollectionSet() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/inapplicableCollectionSet.kt"); + } + + @TestMetadata("InnerClassInAnonymous.kt") + public void testInnerClassInAnonymous() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt"); + } + + @TestMetadata("kt43342.kt") + public void testKt43342() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/kt43342.kt"); + } + + @TestMetadata("readWriteProperty.kt") + public void testReadWriteProperty() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/readWriteProperty.kt"); + } + + @TestMetadata("recursiveCapturedTypeInPropertyReference.kt") + public void testRecursiveCapturedTypeInPropertyReference() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/recursiveCapturedTypeInPropertyReference.kt"); + } + + @TestMetadata("SafeLetWithReturn.kt") + public void testSafeLetWithReturn() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/SafeLetWithReturn.kt"); + } + + @TestMetadata("SignatureClash.kt") + public void testSignatureClash() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/SignatureClash.kt"); + } + + @TestMetadata("SimpleTypeMarker.kt") + public void testSimpleTypeMarker() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/SimpleTypeMarker.kt"); + } + + @TestMetadata("TypeParameterBounds.kt") + public void testTypeParameterBounds() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/TypeParameterBounds.kt"); + } + + @TestMetadata("typeVariableAfterBuildMap.kt") + public void testTypeVariableAfterBuildMap() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/typeVariableAfterBuildMap.kt"); + } + + @TestMetadata("VarInInit.kt") + public void testVarInInit() throws Exception { + runTest("compiler/testData/ir/irText/firProblems/VarInInit.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irText/lambdas") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambdas extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInLambdas() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/lambdas"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("anonymousFunction.kt") + public void testAnonymousFunction() throws Exception { + runTest("compiler/testData/ir/irText/lambdas/anonymousFunction.kt"); + } + + @TestMetadata("destructuringInLambda.kt") + public void testDestructuringInLambda() throws Exception { + runTest("compiler/testData/ir/irText/lambdas/destructuringInLambda.kt"); + } + + @TestMetadata("extensionLambda.kt") + public void testExtensionLambda() throws Exception { + runTest("compiler/testData/ir/irText/lambdas/extensionLambda.kt"); + } + + @TestMetadata("justLambda.kt") + public void testJustLambda() throws Exception { + runTest("compiler/testData/ir/irText/lambdas/justLambda.kt"); + } + + @TestMetadata("localFunction.kt") + public void testLocalFunction() throws Exception { + runTest("compiler/testData/ir/irText/lambdas/localFunction.kt"); + } + + @TestMetadata("multipleImplicitReceivers.kt") + public void testMultipleImplicitReceivers() throws Exception { + runTest("compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.kt"); + } + + @TestMetadata("nonLocalReturn.kt") + public void testNonLocalReturn() throws Exception { + runTest("compiler/testData/ir/irText/lambdas/nonLocalReturn.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irText/regressions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Regressions extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInRegressions() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("coercionInLoop.kt") + public void testCoercionInLoop() throws Exception { + runTest("compiler/testData/ir/irText/regressions/coercionInLoop.kt"); + } + + @TestMetadata("integerCoercionToT.kt") + public void testIntegerCoercionToT() throws Exception { + runTest("compiler/testData/ir/irText/regressions/integerCoercionToT.kt"); + } + + @TestMetadata("kt24114.kt") + public void testKt24114() throws Exception { + runTest("compiler/testData/ir/irText/regressions/kt24114.kt"); + } + + @TestMetadata("kt45236.kt") + public void testKt45236() throws Exception { + runTest("compiler/testData/ir/irText/regressions/kt45236.kt"); + } + + @TestMetadata("typeAliasCtorForGenericClass.kt") + public void testTypeAliasCtorForGenericClass() throws Exception { + runTest("compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.kt"); + } + + @TestMetadata("compiler/testData/ir/irText/regressions/newInference") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NewInference extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInNewInference() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/regressions/newInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("fixationOrder1.kt") + public void testFixationOrder1() throws Exception { + runTest("compiler/testData/ir/irText/regressions/newInference/fixationOrder1.kt"); + } + } + } + + @TestMetadata("compiler/testData/ir/irText/singletons") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Singletons extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInSingletons() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/singletons"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("companion.kt") + public void testCompanion() throws Exception { + runTest("compiler/testData/ir/irText/singletons/companion.kt"); + } + + @TestMetadata("enumEntry.kt") + public void testEnumEntry() throws Exception { + runTest("compiler/testData/ir/irText/singletons/enumEntry.kt"); + } + + @TestMetadata("object.kt") + public void testObject() throws Exception { + runTest("compiler/testData/ir/irText/singletons/object.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irText/stubs") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Stubs extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInStubs() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/stubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("builtinMap.kt") + public void testBuiltinMap() throws Exception { + runTest("compiler/testData/ir/irText/stubs/builtinMap.kt"); + } + + @TestMetadata("constFromBuiltins.kt") + public void testConstFromBuiltins() throws Exception { + runTest("compiler/testData/ir/irText/stubs/constFromBuiltins.kt"); + } + + @TestMetadata("genericClassInDifferentModule.kt") + public void testGenericClassInDifferentModule() throws Exception { + runTest("compiler/testData/ir/irText/stubs/genericClassInDifferentModule.kt"); + } + + @TestMetadata("kotlinInnerClass.kt") + public void testKotlinInnerClass() throws Exception { + runTest("compiler/testData/ir/irText/stubs/kotlinInnerClass.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("compiler/testData/ir/irText/stubs/simple.kt"); + } + } + + @TestMetadata("compiler/testData/ir/irText/types") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Types extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + @TestMetadata("abbreviatedTypes.kt") + public void testAbbreviatedTypes() throws Exception { + runTest("compiler/testData/ir/irText/types/abbreviatedTypes.kt"); + } + + public void testAllFilesPresentInTypes() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("castsInsideCoroutineInference.kt") + public void testCastsInsideCoroutineInference() throws Exception { + runTest("compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt"); + } + + @TestMetadata("coercionToUnitInLambdaReturnValue.kt") + public void testCoercionToUnitInLambdaReturnValue() throws Exception { + runTest("compiler/testData/ir/irText/types/coercionToUnitInLambdaReturnValue.kt"); + } + + @TestMetadata("genericDelegatedDeepProperty.kt") + public void testGenericDelegatedDeepProperty() throws Exception { + runTest("compiler/testData/ir/irText/types/genericDelegatedDeepProperty.kt"); + } + + @TestMetadata("genericFunWithStar.kt") + public void testGenericFunWithStar() throws Exception { + runTest("compiler/testData/ir/irText/types/genericFunWithStar.kt"); + } + + @TestMetadata("genericPropertyReferenceType.kt") + public void testGenericPropertyReferenceType() throws Exception { + runTest("compiler/testData/ir/irText/types/genericPropertyReferenceType.kt"); + } + + @TestMetadata("inStarProjectionInReceiverType.kt") + public void testInStarProjectionInReceiverType() throws Exception { + runTest("compiler/testData/ir/irText/types/inStarProjectionInReceiverType.kt"); + } + + @TestMetadata("intersectionType1_NI.kt") + public void testIntersectionType1_NI() throws Exception { + runTest("compiler/testData/ir/irText/types/intersectionType1_NI.kt"); + } + + @TestMetadata("intersectionType1_OI.kt") + public void testIntersectionType1_OI() throws Exception { + runTest("compiler/testData/ir/irText/types/intersectionType1_OI.kt"); + } + + @TestMetadata("intersectionType2_NI.kt") + public void testIntersectionType2_NI() throws Exception { + runTest("compiler/testData/ir/irText/types/intersectionType2_NI.kt"); + } + + @TestMetadata("intersectionType2_OI.kt") + public void testIntersectionType2_OI() throws Exception { + runTest("compiler/testData/ir/irText/types/intersectionType2_OI.kt"); + } + + @TestMetadata("intersectionType3_NI.kt") + public void testIntersectionType3_NI() throws Exception { + runTest("compiler/testData/ir/irText/types/intersectionType3_NI.kt"); + } + + @TestMetadata("intersectionType3_OI.kt") + public void testIntersectionType3_OI() throws Exception { + runTest("compiler/testData/ir/irText/types/intersectionType3_OI.kt"); + } + + @TestMetadata("kt36143.kt") + public void testKt36143() throws Exception { + runTest("compiler/testData/ir/irText/types/kt36143.kt"); + } + + @TestMetadata("localVariableOfIntersectionType_NI.kt") + public void testLocalVariableOfIntersectionType_NI() throws Exception { + runTest("compiler/testData/ir/irText/types/localVariableOfIntersectionType_NI.kt"); + } + + @TestMetadata("smartCastOnFakeOverrideReceiver.kt") + public void testSmartCastOnFakeOverrideReceiver() throws Exception { + runTest("compiler/testData/ir/irText/types/smartCastOnFakeOverrideReceiver.kt"); + } + + @TestMetadata("smartCastOnReceiverOfGenericType.kt") + public void testSmartCastOnReceiverOfGenericType() throws Exception { + runTest("compiler/testData/ir/irText/types/smartCastOnReceiverOfGenericType.kt"); + } + + @TestMetadata("starProjection_OI.kt") + public void testStarProjection_OI() throws Exception { + runTest("compiler/testData/ir/irText/types/starProjection_OI.kt"); + } + + @TestMetadata("typeAliasWithUnsafeVariance.kt") + public void testTypeAliasWithUnsafeVariance() throws Exception { + runTest("compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt"); + } + + @TestMetadata("compiler/testData/ir/irText/types/nullChecks") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NullChecks extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInNullChecks() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types/nullChecks"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @TestMetadata("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NullCheckOnLambdaResult extends AbstractKlibTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + + public void testAllFilesPresentInNullCheckOnLambdaResult() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } + } + } +}