[JS FIR Tests] Add source map smoke test for FIR

^KT-64450 Fixed
This commit is contained in:
Alexander Korepanov
2024-01-16 11:59:35 +01:00
committed by Space Team
parent 6884266328
commit b672e5c131
4 changed files with 72 additions and 1 deletions
@@ -171,6 +171,10 @@ fun main(args: Array<String>) {
testClass<AbstractFirJsLineNumberTest> {
model("lineNumbers/")
}
testClass<AbstractFirSourceMapGenerationSmokeTest> {
model("sourcemap/")
}
}
testGroup("js/js.tests/tests-gen", "compiler/testData", testRunnerMethodName = "runTest0") {
@@ -8,6 +8,7 @@ import org.jetbrains.kotlin.js.test.converters.incremental.RecompileModuleJsIrBa
import org.jetbrains.kotlin.js.test.handlers.JsDebugRunner
import org.jetbrains.kotlin.js.test.handlers.JsIrRecompiledArtifactsIdentityHandler
import org.jetbrains.kotlin.js.test.handlers.createFirJsLineNumberHandler
import org.jetbrains.kotlin.js.test.ir.AbstractJsIrTest
import org.jetbrains.kotlin.parsing.parseBoolean
import org.jetbrains.kotlin.test.Constructor
import org.jetbrains.kotlin.test.FirParser
@@ -163,6 +164,21 @@ open class AbstractFirJsLineNumberTest : AbstractFirJsTest(
}
}
open class AbstractFirSourceMapGenerationSmokeTest : AbstractFirJsTest(
pathToTestDir = "${JsEnvironmentConfigurator.TEST_DATA_DIR_PATH}/sourcemap/",
testGroupOutputDirPrefix = "firSourcemap/"
) {
override fun configure(builder: TestConfigurationBuilder) {
super.configure(builder)
with(builder) {
defaultDirectives {
+JsEnvironmentConfigurationDirectives.GENERATE_SOURCE_MAP
-JsEnvironmentConfigurationDirectives.GENERATE_NODE_JS_RUNNER
}
}
}
}
open class AbstractFirJsSteppingTest : AbstractFirJsTest(
pathToTestDir = "compiler/testData/debug/stepping/",
testGroupOutputDirPrefix = "debug/firStepping/"
@@ -154,7 +154,7 @@ open class AbstractJsIrLineNumberTest : AbstractJsIrTest(
open class AbstractSourceMapGenerationSmokeTest : AbstractJsIrTest(
pathToTestDir = "${JsEnvironmentConfigurator.TEST_DATA_DIR_PATH}/sourcemap/",
testGroupOutputDirPrefix = "sourcemap/"
testGroupOutputDirPrefix = "irSourcemap/"
) {
override fun configure(builder: TestConfigurationBuilder) {
super.configure(builder)