Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package org.jetbrains.kotlin.js.test.runners

import org.jetbrains.kotlin.js.test.JsAdditionalSourceProvider
import org.jetbrains.kotlin.js.test.converters.*
import org.jetbrains.kotlin.js.test.converters.incremental.RecompileModuleJsIrBackendFacade
import org.jetbrains.kotlin.js.test.handlers.*
Expand Down Expand Up @@ -33,7 +32,6 @@ import org.jetbrains.kotlin.test.services.configuration.CommonEnvironmentConfigu
import org.jetbrains.kotlin.test.services.configuration.JsFirstStageEnvironmentConfigurator
import org.jetbrains.kotlin.test.services.configuration.JsSecondStageEnvironmentConfigurator
import org.jetbrains.kotlin.test.services.sourceProviders.AdditionalDiagnosticsSourceFilesProvider
import org.jetbrains.kotlin.test.services.sourceProviders.CoroutineHelpersSourceFilesProvider
import org.jetbrains.kotlin.utils.addToStdlib.runIf
import org.jetbrains.kotlin.utils.bind
import java.lang.Boolean.getBoolean
Expand Down Expand Up @@ -230,8 +228,6 @@ fun TestConfigurationBuilder.commonServicesConfigurationForJsCodegenTest(
}

useAdditionalSourceProviders(
::JsAdditionalSourceProvider,
::CoroutineHelpersSourceFilesProvider,
::AdditionalDiagnosticsSourceFilesProvider,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package org.jetbrains.kotlin.js.test.runners

import org.jetbrains.kotlin.js.test.JsAdditionalSourceProvider
import org.jetbrains.kotlin.test.FirParser
import org.jetbrains.kotlin.test.TargetBackend
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
Expand All @@ -15,6 +16,7 @@ import org.jetbrains.kotlin.test.configuration.commonIrHandlersForCodegenTest
import org.jetbrains.kotlin.test.directives.JsEnvironmentConfigurationDirectives
import org.jetbrains.kotlin.test.frontend.fir.FirMetaInfoDiffSuppressor
import org.jetbrains.kotlin.test.services.configuration.JsEnvironmentConfigurator
import org.jetbrains.kotlin.test.services.sourceProviders.CoroutineHelpersSourceFilesProvider

abstract class AbstractJsES6Test(
pathToTestDir: String = "${JsEnvironmentConfigurator.TEST_DATA_DIR_PATH}/box/",
Expand All @@ -32,17 +34,21 @@ abstract class AbstractJsES6Test(
}


abstract class AbstractJsES6BoxTest : AbstractJsES6Test(
abstract class AbstractJsES6BoxTest : AbstractJsES6CodegenBoxTest(
pathToTestDir = "${JsEnvironmentConfigurator.TEST_DATA_DIR_PATH}/box/",
testGroupOutputDirPrefix = "es6Box/"
)

abstract class AbstractJsES6CodegenBoxTest : AbstractJsES6Test(
pathToTestDir = "compiler/testData/codegen/box/",
testGroupOutputDirPrefix = "codegen/es6Box/"
) {
abstract class AbstractJsES6CodegenBoxTest(
pathToTestDir : String = "compiler/testData/codegen/box/",
testGroupOutputDirPrefix : String = "codegen/es6Box/"
) : AbstractJsES6Test(pathToTestDir, testGroupOutputDirPrefix) {
override fun configure(builder: TestConfigurationBuilder) {
super.configure(builder)
builder.useAdditionalSourceProviders(
::JsAdditionalSourceProvider,
::CoroutineHelpersSourceFilesProvider,
)
builder.configureFirHandlersStep {
commonFirHandlersForCodegenTest()
}
Expand All @@ -57,12 +63,12 @@ abstract class AbstractJsES6CodegenBoxTest : AbstractJsES6Test(
}
}

abstract class AbstractJsES6CodegenInlineTest : AbstractJsES6Test(
abstract class AbstractJsES6CodegenInlineTest : AbstractJsES6CodegenBoxTest(
pathToTestDir = "compiler/testData/codegen/boxInline/",
testGroupOutputDirPrefix = "codegen/es6BoxInline/"
)

abstract class AbstractJsES6CodegenWasmJsInteropTest : AbstractJsES6Test(
abstract class AbstractJsES6CodegenWasmJsInteropTest : AbstractJsES6CodegenBoxTest(
pathToTestDir = "compiler/testData/codegen/boxWasmJsInterop",
testGroupOutputDirPrefix = "codegen/boxWasmJsInteropEs6",
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package org.jetbrains.kotlin.js.test.runners

import org.jetbrains.kotlin.config.LanguageFeature
import org.jetbrains.kotlin.js.test.JsAdditionalSourceProvider
import org.jetbrains.kotlin.js.test.handlers.JsIrRecompiledArtifactsIdentityHandler
import org.jetbrains.kotlin.js.test.handlers.JsLineNumberHandler
import org.jetbrains.kotlin.js.test.handlers.JsSizeHandler
Expand Down Expand Up @@ -42,6 +43,7 @@ import org.jetbrains.kotlin.test.frontend.fir.handlers.FirResolvedTypesVerifier
import org.jetbrains.kotlin.test.services.SplittingModuleTransformerForBoxTests
import org.jetbrains.kotlin.test.services.SplittingTestConfigurator
import org.jetbrains.kotlin.test.services.configuration.JsEnvironmentConfigurator
import org.jetbrains.kotlin.test.services.sourceProviders.CoroutineHelpersSourceFilesProvider
import java.lang.Boolean.getBoolean


Expand Down Expand Up @@ -107,6 +109,10 @@ abstract class AbstractJsCodegenBoxTestBase(
) : AbstractJsTest(pathToTestDir, testGroupOutputDirPrefix) {
override fun configure(builder: TestConfigurationBuilder) {
super.configure(builder)
builder.useAdditionalSourceProviders(
::JsAdditionalSourceProvider,
::CoroutineHelpersSourceFilesProvider,
)
builder.configureFirHandlersStep {
commonFirHandlersForCodegenTest()
}
Expand Down
2 changes: 1 addition & 1 deletion js/js.translator/testData/box/kotlin.test/_common.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fun raise(name: String): Nothing {
}

// Adapter should be initialized eagerly
@Suppress("INVISIBLE_MEMBER")
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")

@vsukharev Vladimir Sukharev (vsukharev) Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suppress is now needed due to added NoFirCompilationErrorsHandler via commonFirHandlersForCodegenTest()

@OptIn(kotlin.ExperimentalStdlibApi::class)
@EagerInitialization
private val underscore = kotlin.test.setAdapter(object : FrameworkAdapter {
Expand Down