[JS TESTS] Drop ES6 tests
This commit is contained in:
@@ -10,11 +10,6 @@ import org.jetbrains.kotlin.generators.impl.generateTestGroupSuite
|
||||
import org.jetbrains.kotlin.js.test.AbstractDceTest
|
||||
import org.jetbrains.kotlin.js.test.AbstractJsLineNumberTest
|
||||
import org.jetbrains.kotlin.js.test.compatibility.binary.AbstractJsKlibBinaryCompatibilityTest
|
||||
import org.jetbrains.kotlin.js.test.es6.semantics.AbstractIrBoxJsES6Test
|
||||
import org.jetbrains.kotlin.js.test.es6.semantics.AbstractIrJsCodegenBoxES6Test
|
||||
import org.jetbrains.kotlin.js.test.es6.semantics.AbstractIrJsCodegenInlineES6Test
|
||||
import org.jetbrains.kotlin.js.test.es6.semantics.AbstractIrJsTypeScriptExportES6Test
|
||||
import org.jetbrains.kotlin.js.test.ir.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
|
||||
@@ -42,14 +37,6 @@ fun main(args: Array<String>) {
|
||||
model("box/native/", pattern = "^([^_](.+))\\.kt$", targetBackend = TargetBackend.WASM)
|
||||
}
|
||||
|
||||
testClass<AbstractIrBoxJsES6Test> {
|
||||
model("box/", pattern = "^([^_](.+))\\.kt$", targetBackend = TargetBackend.JS_IR_ES6)
|
||||
}
|
||||
|
||||
testClass<AbstractIrJsTypeScriptExportES6Test> {
|
||||
model("typescript-export/", pattern = "^([^_](.+))\\.kt$", targetBackend = TargetBackend.JS_IR_ES6)
|
||||
}
|
||||
|
||||
testClass<AbstractDceTest> {
|
||||
model("dce/", pattern = "(.+)\\.js", targetBackend = TargetBackend.JS)
|
||||
}
|
||||
@@ -84,14 +71,6 @@ fun main(args: Array<String>) {
|
||||
testClass<AbstractIrCodegenWasmJsInteropWasmTest> {
|
||||
model("codegen/boxWasmJsInterop", targetBackend = TargetBackend.WASM)
|
||||
}
|
||||
|
||||
testClass<AbstractIrJsCodegenBoxES6Test> {
|
||||
model("codegen/box", targetBackend = TargetBackend.JS_IR_ES6, excludeDirs = jvmOnlyBoxTests)
|
||||
}
|
||||
|
||||
testClass<AbstractIrJsCodegenInlineES6Test> {
|
||||
model("codegen/boxInline/", targetBackend = TargetBackend.JS_IR_ES6)
|
||||
}
|
||||
}
|
||||
|
||||
testGroup("js/js.tests/tests-gen", "compiler/testData/binaryCompatibility", testRunnerMethodName = "runTest0") {
|
||||
|
||||
@@ -262,7 +262,7 @@ abstract class BasicBoxTest(
|
||||
module.name.endsWith(OLD_MODULE_SUFFIX) -> null
|
||||
// JS_IR generates single js file for all modules (apart from runtime).
|
||||
// TODO: Split and refactor test runner for JS_IR
|
||||
targetBackend in listOf(TargetBackend.JS_IR, TargetBackend.JS_IR_ES6) && !isMainModule -> null
|
||||
targetBackend == TargetBackend.JS_IR && !isMainModule -> null
|
||||
else -> Pair(outputFileName, module)
|
||||
}
|
||||
}
|
||||
@@ -838,7 +838,6 @@ abstract class BasicBoxTest(
|
||||
}
|
||||
|
||||
val libraries = when (targetBackend) {
|
||||
TargetBackend.JS_IR_ES6 -> dependencies
|
||||
TargetBackend.JS_IR -> dependencies
|
||||
TargetBackend.JS -> JsConfig.JS_STDLIB + JsConfig.JS_KOTLIN_TEST + dependencies
|
||||
else -> error("Unsupported target backend: $targetBackend")
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2020 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.js.test
|
||||
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
|
||||
abstract class BasicIrBoxES6Test(
|
||||
pathToTestDir: String,
|
||||
testGroupOutputDirPrefix: String
|
||||
) : BasicIrBoxTest(
|
||||
pathToTestDir,
|
||||
testGroupOutputDirPrefix,
|
||||
targetBackend = TargetBackend.JS_IR_ES6
|
||||
)
|
||||
@@ -179,8 +179,6 @@ abstract class BasicIrBoxTest(
|
||||
|
||||
override val runIrPir: Boolean = !lowerPerModule && getBoolean("kotlin.js.ir.pir", true)
|
||||
|
||||
val runEs6Mode: Boolean = getBoolean("kotlin.js.ir.es6", false)
|
||||
|
||||
val perModule: Boolean = getBoolean("kotlin.js.ir.perModule")
|
||||
|
||||
// TODO Design incremental compilation for IR and add test support
|
||||
@@ -408,7 +406,6 @@ abstract class BasicIrBoxTest(
|
||||
irFactory = IrFactoryImpl,
|
||||
exportedDeclarations = setOf(FqName.fromSegments(listOfNotNull(testPackage, testFunction))),
|
||||
dceDriven = dceDriven,
|
||||
es6mode = runEs6Mode,
|
||||
propertyLazyInitialization = propertyLazyInitialization,
|
||||
verifySignatures = !skipMangleVerification,
|
||||
lowerPerModule = lowerPerModule,
|
||||
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2020 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.js.test.es6.semantics
|
||||
|
||||
import org.jetbrains.kotlin.js.test.BasicIrBoxES6Test
|
||||
import org.jetbrains.kotlin.js.test.ir.semantics.AbstractIrJsTypeScriptExportTest
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
|
||||
abstract class AbstractIrBoxJsES6Test : BasicIrBoxES6Test(TEST_DATA_DIR_PATH + "box/", "irBox/")
|
||||
|
||||
abstract class AbstractIrJsCodegenBoxES6Test : BasicIrBoxES6Test(
|
||||
"compiler/testData/codegen/box/",
|
||||
"codegen/irBox/"
|
||||
)
|
||||
|
||||
abstract class AbstractIrJsCodegenInlineES6Test : BasicIrBoxES6Test(
|
||||
"compiler/testData/codegen/boxInline/",
|
||||
"codegen/irBoxInline/"
|
||||
)
|
||||
|
||||
abstract class AbstractIrJsTypeScriptExportES6Test : AbstractIrJsTypeScriptExportTest(
|
||||
targetBackend = TargetBackend.JS_IR_ES6
|
||||
)
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2020 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.js.test.ir.semantics
|
||||
|
||||
import org.jetbrains.kotlin.js.test.BasicIrBoxTest
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlin.utils.fileUtils.withReplacedExtensionOrNull
|
||||
import java.io.File
|
||||
import java.lang.Boolean.getBoolean
|
||||
|
||||
@Suppress("ConstantConditionIf")
|
||||
abstract class AbstractIrJsTypeScriptExportTest(
|
||||
targetBackend: TargetBackend = TargetBackend.JS_IR
|
||||
) : BasicIrBoxTest(
|
||||
pathToTestDir = TEST_DATA_DIR_PATH + "typescript-export/",
|
||||
testGroupOutputDirPrefix = "typescript-export/",
|
||||
targetBackend = targetBackend
|
||||
) {
|
||||
override val generateDts = true
|
||||
private val updateReferenceDtsFiles = getBoolean("kotlin.js.updateReferenceDtsFiles")
|
||||
|
||||
override fun performAdditionalChecks(inputFile: File, outputFile: File) {
|
||||
if (skipRegularMode) return
|
||||
val referenceDtsFile = inputFile.withReplacedExtensionOrNull(".kt", ".d.ts")
|
||||
?: error("Can't find reference .d.ts file")
|
||||
val generatedDtsFile = outputFile.withReplacedExtensionOrNull("_v5", ".d.ts")
|
||||
?: error("Can't find generated .d.ts file")
|
||||
|
||||
val generatedDts = generatedDtsFile.readText()
|
||||
|
||||
if (updateReferenceDtsFiles)
|
||||
referenceDtsFile.writeText(generatedDts)
|
||||
else
|
||||
KotlinTestUtils.assertEqualsToFile(referenceDtsFile, generatedDts)
|
||||
}
|
||||
}
|
||||
@@ -55,7 +55,6 @@ abstract class AbstractJsIrTest(
|
||||
if (runIc) +JsEnvironmentConfigurationDirectives.RUN_IC
|
||||
if (lowerPerModule) +JsEnvironmentConfigurationDirectives.LOWER_PER_MODULE
|
||||
if (getBoolean("kotlin.js.ir.klibMainModule")) +JsEnvironmentConfigurationDirectives.KLIB_MAIN_MODULE
|
||||
if (getBoolean("kotlin.js.ir.es6")) +JsEnvironmentConfigurationDirectives.RUN_ES6_MODE
|
||||
if (getBoolean("kotlin.js.ir.perModule")) +JsEnvironmentConfigurationDirectives.PER_MODULE
|
||||
if (getBoolean("kotlin.js.ir.dce", true)) +JsEnvironmentConfigurationDirectives.RUN_IR_DCE
|
||||
if (!lowerPerModule && getBoolean("kotlin.js.ir.pir", true)) +JsEnvironmentConfigurationDirectives.RUN_IR_PIR
|
||||
|
||||
@@ -112,7 +112,7 @@ class JsIrBackendFacade(
|
||||
exportedDeclarations = setOf(FqName.fromSegments(listOfNotNull(testPackage, TEST_FUNCTION))),
|
||||
dceDriven = runIrPir,
|
||||
dceRuntimeDiagnostic = null,
|
||||
es6mode = JsEnvironmentConfigurationDirectives.RUN_ES6_MODE in module.directives,
|
||||
es6mode = false,
|
||||
propertyLazyInitialization = JsEnvironmentConfigurationDirectives.PROPERTY_LAZY_INITIALIZATION in module.directives,
|
||||
baseClassIntoMetadata = false,
|
||||
lowerPerModule = lowerPerModule,
|
||||
|
||||
Reference in New Issue
Block a user