diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt index 12f3fb311f0..89b92550373 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt @@ -163,46 +163,6 @@ fun generateJUnit5CompilerTests(args: Array) { } } - // ---------------------------------------------- JS tests ---------------------------------------------- - - testGroup(testsRoot = "js/js.tests/tests-gen", testDataRoot = "js/js.translator/testData") { - testClass { - model("box/", pattern = "^([^_](.+))\\.kt$", excludeDirs = listOf("incremental")) - } - - testClass { - model("sourcemap/") - } - - testClass { - model("outputPrefixPostfix/") - } - - testClass { - model("multiModuleOrder/") - } - } - - testGroup(testsRoot = "js/js.tests/tests-gen", testDataRoot = "compiler/testData") { - val jvmOnlyBoxTests = listOf( - "testsWithJava9", - "testsWithJava15", - "testsWithJava17", - ) - - testClass { - model("codegen/box", excludeDirs = jvmOnlyBoxTests + "compileKotlinAgainstKotlin") - } - - testClass { - model("codegen/boxInline") - } - - testClass { - model("codegen/box/arrays") - } - } - // ---------------------------------------------- FIR tests ---------------------------------------------- testGroup(testsRoot = "compiler/fir/analysis-tests/tests-gen", testDataRoot = "compiler/testData") { diff --git a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt index 37458150a7c..dcdb10084e5 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt @@ -5,6 +5,7 @@ package org.jetbrains.kotlin.generators.tests +import org.jetbrains.kotlin.generators.generateTestGroupSuiteWithJUnit5 import org.jetbrains.kotlin.generators.impl.generateTestGroupSuite import org.jetbrains.kotlin.js.test.AbstractDceTest import org.jetbrains.kotlin.js.test.AbstractJsLineNumberTest @@ -18,17 +19,24 @@ import org.jetbrains.kotlin.js.test.semantics.* import org.jetbrains.kotlin.js.test.wasm.semantics.AbstractIrCodegenBoxWasmTest import org.jetbrains.kotlin.js.test.wasm.semantics.AbstractIrCodegenWasmJsInteropWasmTest import org.jetbrains.kotlin.js.test.wasm.semantics.AbstractJsTranslatorWasmTest +import org.jetbrains.kotlin.js.testNew.* import org.jetbrains.kotlin.test.TargetBackend fun main(args: Array) { System.setProperty("java.awt.headless", "true") + val jvmOnlyBoxTests = listOf( + "testsWithJava9", + "testsWithJava15", + "testsWithJava17", + ) + // TODO: repair these tests //generateTestDataForReservedWords() generateTestGroupSuite(args) { testGroup("js/js.tests/tests-gen", "js/js.translator/testData", testRunnerMethodName = "runTest0") { - testClass { + testClass { model("box/incremental/", pattern = "^([^_](.+))\\.kt$", targetBackend = TargetBackend.JS) } @@ -63,12 +71,6 @@ fun main(args: Array) { } testGroup("js/js.tests/tests-gen", "compiler/testData", testRunnerMethodName = "runTest0") { - val jvmOnlyBoxTests = listOf( - "testsWithJava9", - "testsWithJava15", - "testsWithJava17", - ) - testClass { model("codegen/box", targetBackend = TargetBackend.JS_IR, excludeDirs = jvmOnlyBoxTests + "compileKotlinAgainstKotlin") } @@ -121,4 +123,38 @@ fun main(args: Array) { } } } + + generateTestGroupSuiteWithJUnit5(args) { + testGroup("js/js.tests/tests-gen", "js/js.translator/testData", testRunnerMethodName = "runTest0") { + testClass { + model("box/", pattern = "^([^_](.+))\\.kt$", excludeDirs = listOf("incremental")) + } + + testClass { + model("sourcemap/") + } + + testClass { + model("outputPrefixPostfix/") + } + + testClass { + model("multiModuleOrder/") + } + } + + testGroup("js/js.tests/tests-gen", "compiler/testData", testRunnerMethodName = "runTest0") { + testClass { + model("codegen/box", excludeDirs = jvmOnlyBoxTests + "compileKotlinAgainstKotlin") + } + + testClass { + model("codegen/boxInline") + } + + testClass { + model("codegen/box/arrays") + } + } + } }