[TEST] Drop old generated tests which are duplicated by new ones
This commit is contained in:
Generated
-2744
File diff suppressed because it is too large
Load Diff
-1288
File diff suppressed because it is too large
Load Diff
-25901
File diff suppressed because it is too large
Load Diff
-4183
File diff suppressed because it is too large
Load Diff
-48
@@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2017 JetBrains s.r.o.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.checkers.javac
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.checkers.AbstractDiagnosticsTestWithStdLib
|
|
||||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
|
||||||
import org.jetbrains.kotlin.config.JVMConfigurationKeys
|
|
||||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
|
||||||
import org.jetbrains.kotlin.test.util.KtTestUtil.getHomeDirectory
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
abstract class AbstractDiagnosticsTestWithStdLibUsingJavac : AbstractDiagnosticsTestWithStdLib() {
|
|
||||||
|
|
||||||
|
|
||||||
override fun shouldSkipTest(wholeFile: File, files: List<TestFile>): Boolean {
|
|
||||||
return isJavacSkipTest(wholeFile)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setupEnvironment(environment: KotlinCoreEnvironment, testDataFile: File, files: List<TestFile>) {
|
|
||||||
val testDataFileText = testDataFile.readText()
|
|
||||||
|
|
||||||
val groupedByModule = files.groupBy(TestFile::module)
|
|
||||||
val allKtFiles = groupedByModule.values.flatMap { getKtFiles(it, true) }
|
|
||||||
|
|
||||||
if (InTextDirectivesUtils.isDirectiveDefined(testDataFileText, "// FULL_JDK")) {
|
|
||||||
environment.registerJavac(kotlinFiles = allKtFiles)
|
|
||||||
} else {
|
|
||||||
val mockJdk = listOf(File(getHomeDirectory(), "compiler/testData/mockJDK/jre/lib/rt.jar"))
|
|
||||||
environment.registerJavac(kotlinFiles = allKtFiles, bootClasspath = mockJdk)
|
|
||||||
}
|
|
||||||
|
|
||||||
environment.configuration.put(JVMConfigurationKeys.USE_JAVAC, true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-15
@@ -1,15 +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.checkers
|
|
||||||
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
abstract class AbstractDiagnosticsTestWithFirValidation : AbstractDiagnosticsTest() {
|
|
||||||
override fun shouldValidateFirTestData(testDataFile: File): Boolean {
|
|
||||||
val path = testDataFile.absolutePath
|
|
||||||
return !path.endsWith(".kts") && !path.contains("codegen")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2019 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.checkers
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.builtins.StandardNames
|
|
||||||
import org.jetbrains.kotlin.test.ConfigurationKind
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
abstract class AbstractDiagnosticsTestWithStdLib : AbstractDiagnosticsTest() {
|
|
||||||
|
|
||||||
override fun extractConfigurationKind(files: List<TestFile>): ConfigurationKind {
|
|
||||||
return ConfigurationKind.NO_KOTLIN_REFLECT
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun shouldValidateFirTestData(testDataFile: File): Boolean {
|
|
||||||
val path = testDataFile.absolutePath
|
|
||||||
return !path.endsWith(".kts")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-46
@@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2017 JetBrains s.r.o.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.checkers.javac
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.checkers.AbstractDiagnosticsTest
|
|
||||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
|
||||||
import org.jetbrains.kotlin.config.JVMConfigurationKeys
|
|
||||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
|
||||||
import org.jetbrains.kotlin.test.util.KtTestUtil.getHomeDirectory
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
abstract class AbstractDiagnosticsUsingJavacTest : AbstractDiagnosticsTest() {
|
|
||||||
|
|
||||||
override fun shouldSkipTest(wholeFile: File, files: List<TestFile>): Boolean {
|
|
||||||
return isJavacSkipTest(wholeFile)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setupEnvironment(environment: KotlinCoreEnvironment, testDataFile: File, files: List<TestFile>) {
|
|
||||||
val testDataFileText = testDataFile.readText()
|
|
||||||
val groupedByModule = files.groupBy(TestFile::module)
|
|
||||||
val allKtFiles = groupedByModule.values.flatMap { getKtFiles(it, true) }
|
|
||||||
|
|
||||||
if (InTextDirectivesUtils.isDirectiveDefined(testDataFileText, "// FULL_JDK")) {
|
|
||||||
environment.registerJavac(kotlinFiles = allKtFiles)
|
|
||||||
} else {
|
|
||||||
val mockJdk = listOf(File(getHomeDirectory(), "compiler/testData/mockJDK/jre/lib/rt.jar"))
|
|
||||||
environment.registerJavac(kotlinFiles = allKtFiles, bootClasspath = mockJdk)
|
|
||||||
}
|
|
||||||
|
|
||||||
environment.configuration.put(JVMConfigurationKeys.USE_JAVAC, true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-26373
File diff suppressed because it is too large
Load Diff
-4183
File diff suppressed because it is too large
Load Diff
-4183
File diff suppressed because it is too large
Load Diff
Generated
-26293
File diff suppressed because it is too large
Load Diff
@@ -70,16 +70,6 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
generateTestGroupSuite(args) {
|
generateTestGroupSuite(args) {
|
||||||
testGroup("compiler/tests-gen", "compiler/testData") {
|
testGroup("compiler/tests-gen", "compiler/testData") {
|
||||||
testClass<AbstractDiagnosticsTestWithFirValidation>(suiteTestClassName = "DiagnosticsTestGenerated") {
|
|
||||||
model("diagnostics/tests", pattern = "^(.*)\\.kts?$", excludedPattern = excludedFirTestdataPattern)
|
|
||||||
model("codegen/box/diagnostics")
|
|
||||||
}
|
|
||||||
|
|
||||||
testClass<AbstractDiagnosticsUsingJavacTest> {
|
|
||||||
model("diagnostics/tests", excludedPattern = excludedFirTestdataPattern)
|
|
||||||
model("codegen/box/diagnostics")
|
|
||||||
}
|
|
||||||
|
|
||||||
testClass<AbstractJavacDiagnosticsTest> {
|
testClass<AbstractJavacDiagnosticsTest> {
|
||||||
model("javac/diagnostics/tests", excludedPattern = excludedFirTestdataPattern)
|
model("javac/diagnostics/tests", excludedPattern = excludedFirTestdataPattern)
|
||||||
model(
|
model(
|
||||||
@@ -95,14 +85,6 @@ fun main(args: Array<String>) {
|
|||||||
model("javac/fieldsResolution/tests", testClassName = "TestsWithoutJavac", testMethod = "doTestWithoutJavacWrapper")
|
model("javac/fieldsResolution/tests", testClassName = "TestsWithoutJavac", testMethod = "doTestWithoutJavacWrapper")
|
||||||
}
|
}
|
||||||
|
|
||||||
testClass<AbstractDiagnosticsTestWithStdLib> {
|
|
||||||
model("diagnostics/testsWithStdLib", excludedPattern = excludedFirTestdataPattern)
|
|
||||||
}
|
|
||||||
|
|
||||||
testClass<AbstractDiagnosticsTestWithStdLibUsingJavac> {
|
|
||||||
model("diagnostics/testsWithStdLib", excludedPattern = excludedFirTestdataPattern)
|
|
||||||
}
|
|
||||||
|
|
||||||
testClass<AbstractDiagnosticsTestWithJsStdLib> {
|
testClass<AbstractDiagnosticsTestWithJsStdLib> {
|
||||||
model("diagnostics/testsWithJsStdLib")
|
model("diagnostics/testsWithJsStdLib")
|
||||||
}
|
}
|
||||||
@@ -671,10 +653,6 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
|
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
|
||||||
testClass<AbstractFirDiagnosticsTest> {
|
|
||||||
model("resolve", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
|
||||||
}
|
|
||||||
|
|
||||||
testClass<AbstractFirDiagnosticsWithLightTreeTest> {
|
testClass<AbstractFirDiagnosticsWithLightTreeTest> {
|
||||||
model("resolve", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
model("resolve", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
||||||
}
|
}
|
||||||
@@ -685,12 +663,6 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
|
|
||||||
testClass<AbstractFirDiagnosticsWithStdlibTest> {
|
|
||||||
model("resolveWithStdlib", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/testData") {
|
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/testData") {
|
||||||
testClass<AbstractFirLoadCompiledKotlin> {
|
testClass<AbstractFirLoadCompiledKotlin> {
|
||||||
model("loadJava/compiledKotlin", extension = "kt")
|
model("loadJava/compiledKotlin", extension = "kt")
|
||||||
@@ -709,19 +681,6 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/testData") {
|
|
||||||
testClass<AbstractFirOldFrontendDiagnosticsTest> {
|
|
||||||
model("diagnostics/tests", excludedPattern = excludedFirTestdataPattern)
|
|
||||||
}
|
|
||||||
|
|
||||||
testClass<AbstractFirOldFrontendDiagnosticsTestWithStdlib> {
|
|
||||||
model(
|
|
||||||
"diagnostics/testsWithStdLib",
|
|
||||||
excludedPattern = excludedFirTestdataPattern
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
|
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
|
||||||
testClass<AbstractFirOldFrontendLightClassesTest> {
|
testClass<AbstractFirOldFrontendLightClassesTest> {
|
||||||
model("lightClasses")
|
model("lightClasses")
|
||||||
|
|||||||
Reference in New Issue
Block a user