[FIR2IR] Adding 2 new runners for fir2ir-specific tests
This commit is contained in:
committed by
TeamCityServer
parent
a6e477fa88
commit
25d2e61a82
@@ -0,0 +1 @@
|
||||
fun box() = "OK"
|
||||
@@ -0,0 +1,2 @@
|
||||
// FIR_IDENTICAL
|
||||
fun sample() {}
|
||||
@@ -0,0 +1,2 @@
|
||||
fun sample() {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
FILE fqName:<root> fileName:/sample.kt
|
||||
FUN name:sample visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright 2010-2021 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.test.runners.codegen;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/fir/fir2ir/testData/codegen/box")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class FirSpecificBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenTest {
|
||||
@Test
|
||||
public void testAllFilesPresentInBox() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("sample.kt")
|
||||
public void testSample() throws Exception {
|
||||
runTest("compiler/fir/fir2ir/testData/codegen/box/sample.kt");
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright 2010-2021 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.test.runners.ir;
|
||||
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil;
|
||||
import org.jetbrains.kotlin.test.TargetBackend;
|
||||
import org.jetbrains.kotlin.test.TestMetadata;
|
||||
import org.junit.jupiter.api.Nested;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/fir/fir2ir/testData/ir/irText")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class Fir2IrSpecificTextTestGenerated extends AbstractFir2IrTextTest {
|
||||
@Test
|
||||
public void testAllFilesPresentInIrText() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("sample.kt")
|
||||
public void testSample() throws Exception {
|
||||
runTest("compiler/fir/fir2ir/testData/ir/irText/sample.kt");
|
||||
}
|
||||
}
|
||||
+14
@@ -161,6 +161,20 @@ fun generateJUnit5CompilerTests(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
|
||||
testGroup(testsRoot = "compiler/fir/fir2ir/tests-gen", testDataRoot = "compiler/fir/fir2ir/testData") {
|
||||
testClass<AbstractFirBlackBoxCodegenTest>(
|
||||
suiteTestClassName = "FirSpecificBlackBoxCodegenTestGenerated"
|
||||
) {
|
||||
model("codegen/box")
|
||||
}
|
||||
|
||||
testClass<AbstractFir2IrTextTest>(
|
||||
suiteTestClassName = "Fir2IrSpecificTextTestGenerated"
|
||||
) {
|
||||
model("ir/irText")
|
||||
}
|
||||
}
|
||||
|
||||
testGroup("compiler/fir/analysis-tests/tests-gen", "compiler/fir/analysis-tests/testData") {
|
||||
testClass<AbstractFirDiagnosticTest> {
|
||||
model("resolve", pattern = TestGeneratorUtil.KT_WITHOUT_DOTS_IN_NAME)
|
||||
|
||||
Reference in New Issue
Block a user