[TEST] Migrate AbstractDiagnosticsWithJdk9Test to new test runners
This commit is contained in:
+3
-1
@@ -1,4 +1,6 @@
|
|||||||
//WITH_RUNTIME
|
// FIR_IDENTICAL
|
||||||
|
// JDK_KIND: FULL_JDK_9
|
||||||
|
// WITH_STDLIB
|
||||||
import java.util.stream.IntStream
|
import java.util.stream.IntStream
|
||||||
|
|
||||||
fun foo(s: IntStream) {
|
fun foo(s: IntStream) {
|
||||||
Generated
+6
@@ -374,6 +374,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt11167.kt")
|
||||||
|
public void testKt11167() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/kt11167.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt13401.kt")
|
@TestMetadata("kt13401.kt")
|
||||||
public void testKt13401() throws Exception {
|
public void testKt13401() throws Exception {
|
||||||
|
|||||||
+6
@@ -374,6 +374,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
|||||||
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
runTest("compiler/testData/diagnostics/tests/IsExpressions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt11167.kt")
|
||||||
|
public void testKt11167() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/kt11167.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt13401.kt")
|
@TestMetadata("kt13401.kt")
|
||||||
public void testKt13401() throws Exception {
|
public void testKt13401() throws Exception {
|
||||||
|
|||||||
-25
@@ -1,25 +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
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.test.TestJdkKind
|
|
||||||
|
|
||||||
abstract class AbstractDiagnosticsWithJdk9Test : AbstractDiagnosticsTest() {
|
|
||||||
|
|
||||||
override fun getTestJdkKind(files: List<TestFile>): TestJdkKind {
|
|
||||||
return TestJdkKind.FULL_JDK_9
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-35
@@ -1,35 +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 com.intellij.testFramework.TestDataPath;
|
|
||||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
|
||||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
|
||||||
import org.jetbrains.kotlin.test.TestMetadata;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
|
||||||
@SuppressWarnings("all")
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/testsWithJava9")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public class DiagnosticsWithJdk9TestGenerated extends AbstractDiagnosticsWithJdk9Test {
|
|
||||||
private void runTest(String testDataFilePath) throws Exception {
|
|
||||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testAllFilesPresentInTestsWithJava9() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava9"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt11167.kt")
|
|
||||||
public void testKt11167() throws Exception {
|
|
||||||
runTest("compiler/testData/diagnostics/testsWithJava9/kt11167.kt");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -84,10 +84,6 @@ fun main(args: Array<String>) {
|
|||||||
model("diagnostics/testWithModifiedMockJdk")
|
model("diagnostics/testWithModifiedMockJdk")
|
||||||
}
|
}
|
||||||
|
|
||||||
testClass<AbstractDiagnosticsWithJdk9Test> {
|
|
||||||
model("diagnostics/testsWithJava9")
|
|
||||||
}
|
|
||||||
|
|
||||||
testClass<AbstractDiagnosticsWithJdk15Test> {
|
testClass<AbstractDiagnosticsWithJdk15Test> {
|
||||||
model("diagnostics/testsWithJava15")
|
model("diagnostics/testsWithJava15")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user