Move IR interpreter's tests from ir/loweredIr directory into box

This commit is contained in:
Ivan Kylchik
2022-12-22 17:22:58 +01:00
committed by Space Team
parent 7d6bac64fb
commit bc21753877
42 changed files with 642 additions and 329 deletions
-1
View File
@@ -143,7 +143,6 @@
/compiler/testData/ir/irJsText/ "Kotlin Compiler Core"
/compiler/testData/ir/irText/ "Kotlin Compiler Core"
/compiler/testData/ir/klibLayout/ "Kotlin Native"
/compiler/testData/ir/loweredIr/interpreter/ "Kotlin JVM"
/compiler/testData/ir/sourceRanges/ "Kotlin Compiler Core"
/compiler/testData/javaModules/ "Kotlin JVM"
/compiler/testData/klibABI/ "Kotlin Native"
@@ -263,12 +263,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/annotations/kt25489.kt");
}
@Test
@TestMetadata("kt55108.kt")
public void testKt55108() throws Exception {
runTest("compiler/testData/codegen/box/annotations/kt55108.kt");
}
@Test
@TestMetadata("mustBeDocumented.kt")
public void testMustBeDocumented() throws Exception {
@@ -8295,12 +8289,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/constants/foldingBinaryOpsUnsignedConst.kt");
}
@Test
@TestMetadata("kt53480.kt")
public void testKt53480() throws Exception {
runTest("compiler/testData/codegen/box/constants/kt53480.kt");
}
@Test
@TestMetadata("kt9532.kt")
public void testKt9532() throws Exception {
@@ -17123,12 +17111,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/evaluate/plus.kt");
}
@Test
@TestMetadata("referenceNameFromStaticInDifferentModule.kt")
public void testReferenceNameFromStaticInDifferentModule() throws Exception {
runTest("compiler/testData/codegen/box/evaluate/referenceNameFromStaticInDifferentModule.kt");
}
@Test
@TestMetadata("rem.kt")
public void testRem() throws Exception {
@@ -17141,18 +17123,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/evaluate/simpleCallBinary.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
runTest("compiler/testData/codegen/box/evaluate/stringConcatenationWithObject.kt");
}
@Test
@TestMetadata("thisPlusString.kt")
public void testThisPlusString() throws Exception {
runTest("compiler/testData/codegen/box/evaluate/thisPlusString.kt");
}
@Test
@TestMetadata("unaryMinus.kt")
public void testUnaryMinus() throws Exception {
@@ -28106,6 +28076,170 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter")
@TestDataPath("$PROJECT_ROOT")
public class InvolvesIrInterpreter {
@Test
public void testAllFilesPresentInInvolvesIrInterpreter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("kt53480.kt")
public void testKt53480() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/kt53480.kt");
}
@Test
@TestMetadata("kt55108.kt")
public void testKt55108() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/kt55108.kt");
}
@Test
@TestMetadata("referenceNameFromStaticInDifferentModule.kt")
public void testReferenceNameFromStaticInDifferentModule() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/referenceNameFromStaticInDifferentModule.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenationWithObject.kt");
}
@Test
@TestMetadata("thisPlusString.kt")
public void testThisPlusString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusString.kt");
}
@Test
@TestMetadata("useCorrectToString.kt")
public void testUseCorrectToString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/useCorrectToString.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck")
@TestDataPath("$PROJECT_ROOT")
public class DumpIrAndCheck {
@Test
public void testAllFilesPresentInDumpIrAndCheck() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("booleanOperations.kt")
public void testBooleanOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/booleanOperations.kt");
}
@Test
@TestMetadata("byteOperations.kt")
public void testByteOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/byteOperations.kt");
}
@Test
@TestMetadata("charOperations.kt")
public void testCharOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/charOperations.kt");
}
@Test
@TestMetadata("constTrimIndent.kt")
public void testConstTrimIndent() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/constTrimIndent.kt");
}
@Test
@TestMetadata("constTrimMargin.kt")
public void testConstTrimMargin() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/constTrimMargin.kt");
}
@Test
@TestMetadata("doubleOperations.kt")
public void testDoubleOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/doubleOperations.kt");
}
@Test
@TestMetadata("enumName.kt")
public void testEnumName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/enumName.kt");
}
@Test
@TestMetadata("enumRecursiveName.kt")
public void testEnumRecursiveName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/enumRecursiveName.kt");
}
@Test
@TestMetadata("floatOperations.kt")
public void testFloatOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/floatOperations.kt");
}
@Test
@TestMetadata("ifConstVal.kt")
public void testIfConstVal() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/ifConstVal.kt");
}
@Test
@TestMetadata("intOperations.kt")
public void testIntOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/intOperations.kt");
}
@Test
@TestMetadata("kCallableName.kt")
public void testKCallableName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/kCallableName.kt");
}
@Test
@TestMetadata("kt53272.kt")
public void testKt53272() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/kt53272.kt");
}
@Test
@TestMetadata("longOperations.kt")
public void testLongOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/longOperations.kt");
}
@Test
@TestMetadata("shortOperations.kt")
public void testShortOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/shortOperations.kt");
}
@Test
@TestMetadata("stdlibConst.kt")
public void testStdlibConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringOperations.kt");
}
@Test
@TestMetadata("unsignedConst.kt")
public void testUnsignedConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/unsignedConst.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/ir")
@TestDataPath("$PROJECT_ROOT")
@@ -1,151 +0,0 @@
/*
* Copyright 2010-2023 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 org.jetbrains.kotlin.test.generators.GenerateCompilerTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/ir/loweredIr")
@TestDataPath("$PROJECT_ROOT")
public class LoweredIrInterpreterTestGenerated extends AbstractLoweredIrInterpreterTest {
@Test
public void testAllFilesPresentInLoweredIr() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/loweredIr"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/ir/loweredIr/interpreter")
@TestDataPath("$PROJECT_ROOT")
public class Interpreter {
@Test
public void testAllFilesPresentInInterpreter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/loweredIr/interpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("booleanOperations.kt")
public void testBooleanOperations() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/booleanOperations.kt");
}
@Test
@TestMetadata("byteOperations.kt")
public void testByteOperations() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/byteOperations.kt");
}
@Test
@TestMetadata("charOperations.kt")
public void testCharOperations() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/charOperations.kt");
}
@Test
@TestMetadata("constTrimIndent.kt")
public void testConstTrimIndent() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/constTrimIndent.kt");
}
@Test
@TestMetadata("constTrimMargin.kt")
public void testConstTrimMargin() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/constTrimMargin.kt");
}
@Test
@TestMetadata("doubleOperations.kt")
public void testDoubleOperations() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/doubleOperations.kt");
}
@Test
@TestMetadata("enumName.kt")
public void testEnumName() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/enumName.kt");
}
@Test
@TestMetadata("enumRecursiveName.kt")
public void testEnumRecursiveName() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/enumRecursiveName.kt");
}
@Test
@TestMetadata("floatOperations.kt")
public void testFloatOperations() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/floatOperations.kt");
}
@Test
@TestMetadata("ifConstVal.kt")
public void testIfConstVal() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/ifConstVal.kt");
}
@Test
@TestMetadata("intOperations.kt")
public void testIntOperations() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/intOperations.kt");
}
@Test
@TestMetadata("kCallableName.kt")
public void testKCallableName() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/kCallableName.kt");
}
@Test
@TestMetadata("kt53272.kt")
public void testKt53272() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/kt53272.kt");
}
@Test
@TestMetadata("longOperations.kt")
public void testLongOperations() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/longOperations.kt");
}
@Test
@TestMetadata("shortOperations.kt")
public void testShortOperations() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/shortOperations.kt");
}
@Test
@TestMetadata("stdlibConst.kt")
public void testStdlibConst() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/stdlibConst.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/stringOperations.kt");
}
@Test
@TestMetadata("unsignedConst.kt")
public void testUnsignedConst() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/unsignedConst.kt");
}
@Test
@TestMetadata("useCorrectToString.kt")
public void testUseCorrectToString() throws Exception {
runTest("compiler/testData/ir/loweredIr/interpreter/useCorrectToString.kt");
}
}
}
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM_IR
const val trueVal = true
const val falseVal = false
@@ -1,3 +1,6 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
const val minusOneVal = (-1).toByte()
const val oneVal = 1.toByte()
const val twoVal = 2.toByte()
@@ -97,14 +100,14 @@ fun box(): String {
if (compareTo7 != 0) return "Fail 1.7"
if (compareTo8 != 0) return "Fail 1.8"
if (plus1 != 3) return "Fail 2.1"
if (plus2 != 4) return "Fail 2.2"
if (plus3 != 5) return "Fail 2.3"
if (plus4 != 4) return "Fail 2.4"
if (plus5 != 4) return "Fail 2.5"
if (plus6 != 4) return "Fail 2.6"
if (plus7 != 4) return "Fail 2.7"
if (plus8 != 4) return "Fail 2.8"
if (plus1 != 3) return "Fail 2.1"
if (plus2 != 4) return "Fail 2.2"
if (plus3 != 5) return "Fail 2.3"
if (plus4 != 4) return "Fail 2.4"
if (plus5 != 4) return "Fail 2.5"
if (plus6 != 4) return "Fail 2.6"
if (plus7 != 4.0f) return "Fail 2.7"
if (plus8 != 4.0f) return "Fail 2.8"
if (minus1 != -1) return "Fail 3.1"
if (minus2 != 0) return "Fail 3.2"
@@ -1,4 +1,6 @@
// TARGET_BACKEND: JVM_IR
// WITH_STDLIB
const val oneVal = '1'
const val twoVal = '2'
const val threeVal = '3'
@@ -1,4 +1,7 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
// WITH_STDLIB
const val trimIndent = "123".trimIndent()
const val complexTrimIndent =
"""
@@ -1,4 +1,7 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
// WITH_STDLIB
const val trimMargin = "123".trimMargin()
const val trimMarginDefault = """ABC
@@ -1,3 +1,6 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
const val minusOneVal = -1.0
const val oneVal = 1.0
const val twoVal = 2.0
@@ -95,14 +98,14 @@ fun box(): String {
if (compareTo7 != 0) return "Fail 1.7"
if (compareTo8 != 0) return "Fail 1.8"
if (plus1 != 3) return "Fail 2.1"
if (plus2 != 4) return "Fail 2.2"
if (plus3 != 5) return "Fail 2.3"
if (plus4 != 4) return "Fail 2.4"
if (plus5 != 4) return "Fail 2.5"
if (plus6 != 4) return "Fail 2.6"
if (plus7 != 4) return "Fail 2.7"
if (plus8 != 4) return "Fail 2.8"
if (plus1 != 3) return "Fail 2.1"
if (plus2 != 4) return "Fail 2.2"
if (plus3 != 5) return "Fail 2.3"
if (plus4 != 4) return "Fail 2.4"
if (plus5 != 4) return "Fail 2.5"
if (plus6 != 4) return "Fail 2.6"
if (plus7 != 4.0f) return "Fail 2.7"
if (plus8 != 4.0) return "Fail 2.8"
if (minus1 != -1) return "Fail 3.1"
if (minus2 != 0) return "Fail 3.2"
@@ -1,3 +1,6 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
enum class EnumClass {
OK, VALUE, anotherValue, WITH_UNDERSCORE
}
@@ -1,4 +1,5 @@
// TARGET_BACKEND: JVM
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
// IGNORE_FIR_DIAGNOSTICS
// !DIAGNOSTICS: -UNINITIALIZED_ENUM_ENTRY
@@ -1,3 +1,6 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
const val minusOneVal = -1.0f
const val oneVal = 1.0f
const val twoVal = 2.0f
@@ -95,14 +98,14 @@ fun box(): String {
if (compareTo7 != 0) return "Fail 1.7"
if (compareTo8 != 0) return "Fail 1.8"
if (plus1 != 3) return "Fail 2.1"
if (plus2 != 4) return "Fail 2.2"
if (plus3 != 5) return "Fail 2.3"
if (plus4 != 4) return "Fail 2.4"
if (plus5 != 4) return "Fail 2.5"
if (plus6 != 4) return "Fail 2.6"
if (plus7 != 4) return "Fail 2.7"
if (plus8 != 4) return "Fail 2.8"
if (plus1 != 3) return "Fail 2.1"
if (plus2 != 4) return "Fail 2.2"
if (plus3 != 5) return "Fail 2.3"
if (plus4 != 4) return "Fail 2.4"
if (plus5 != 4) return "Fail 2.5"
if (plus6 != 4) return "Fail 2.6"
if (plus7 != 4.0f) return "Fail 2.7"
if (plus8 != 4.0) return "Fail 2.8"
if (minus1 != -1) return "Fail 3.1"
if (minus2 != 0) return "Fail 3.2"
@@ -1,3 +1,6 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
const val flag = true
const val value = 10
const val condition = if (flag) "True" else "Error"
@@ -1,3 +1,6 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
const val minusOneVal = -1
const val oneVal = 1
const val twoVal = 2
@@ -97,14 +100,14 @@ fun box(): String {
if (compareTo7 != 0) return "Fail 1.7"
if (compareTo8 != 0) return "Fail 1.8"
if (plus1 != 3) return "Fail 2.1"
if (plus2 != 4) return "Fail 2.2"
if (plus3 != 5) return "Fail 2.3"
if (plus4 != 4) return "Fail 2.4"
if (plus5 != 4) return "Fail 2.5"
if (plus6 != 4) return "Fail 2.6"
if (plus7 != 4) return "Fail 2.7"
if (plus8 != 4) return "Fail 2.8"
if (plus1 != 3) return "Fail 2.1"
if (plus2 != 4) return "Fail 2.2"
if (plus3 != 5) return "Fail 2.3"
if (plus4 != 4) return "Fail 2.4"
if (plus5 != 4) return "Fail 2.5"
if (plus6 != 4) return "Fail 2.6"
if (plus7 != 4.0f) return "Fail 2.7"
if (plus8 != 4.0) return "Fail 2.8"
if (minus1 != -1) return "Fail 3.1"
if (minus2 != 0) return "Fail 3.2"
@@ -1,3 +1,6 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
class A(val OK: Int, val somePropertyWithLongName: String) {
fun foo() {}
}
@@ -1,3 +1,6 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
// FILE: 1.kt
const val name = E.OK.name
@@ -1,3 +1,6 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
const val minusOneVal = -1L
const val oneVal = 1L
const val twoVal = 2L
@@ -97,14 +100,14 @@ fun box(): String {
if (compareTo7 != 0) return "Fail 1.7"
if (compareTo8 != 0) return "Fail 1.8"
if (plus1 != 3) return "Fail 2.1"
if (plus2 != 4) return "Fail 2.2"
if (plus3 != 5) return "Fail 2.3"
if (plus4 != 4) return "Fail 2.4"
if (plus5 != 4) return "Fail 2.5"
if (plus6 != 4) return "Fail 2.6"
if (plus7 != 4) return "Fail 2.7"
if (plus8 != 4) return "Fail 2.8"
if (plus1 != 3) return "Fail 2.1"
if (plus2 != 4) return "Fail 2.2"
if (plus3 != 5) return "Fail 2.3"
if (plus4 != 4) return "Fail 2.4"
if (plus5 != 4) return "Fail 2.5"
if (plus6 != 4) return "Fail 2.6"
if (plus7 != 4.0f) return "Fail 2.7"
if (plus8 != 4.0) return "Fail 2.8"
if (minus1 != -1) return "Fail 3.1"
if (minus2 != 0) return "Fail 3.2"
@@ -1,3 +1,6 @@
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
const val minusOneVal = (-1).toShort()
const val oneVal = 1.toShort()
const val twoVal = 2.toShort()
@@ -97,14 +100,14 @@ fun box(): String {
if (compareTo7 != 0) return "Fail 1.7"
if (compareTo8 != 0) return "Fail 1.8"
if (plus1 != 3) return "Fail 2.1"
if (plus2 != 4) return "Fail 2.2"
if (plus3 != 5) return "Fail 2.3"
if (plus4 != 4) return "Fail 2.4"
if (plus5 != 4) return "Fail 2.5"
if (plus6 != 4) return "Fail 2.6"
if (plus7 != 4) return "Fail 2.7"
if (plus8 != 4) return "Fail 2.8"
if (plus1 != 3) return "Fail 2.1"
if (plus2 != 4) return "Fail 2.2"
if (plus3 != 5) return "Fail 2.3"
if (plus4 != 4) return "Fail 2.4"
if (plus5 != 4) return "Fail 2.5"
if (plus6 != 4) return "Fail 2.6"
if (plus7 != 4.0f) return "Fail 2.7"
if (plus8 != 4.0) return "Fail 2.8"
if (minus1 != -1) return "Fail 3.1"
if (minus2 != 0) return "Fail 3.2"
@@ -1,3 +1,4 @@
// TARGET_BACKEND: JVM_IR
// WITH_STDLIB
const val code = '1'.code
@@ -1,3 +1,5 @@
// TARGET_BACKEND: JVM_IR
const val someStr = "123"
const val otherStr = "other"
@@ -1,4 +1,6 @@
// TARGET_BACKEND: JVM_IR
// WITH_STDLIB
const val byteVal: UByte = 1u
const val shortVal: UShort = 2u
const val intVal: UInt = 3u
@@ -1,3 +1,4 @@
// TARGET_BACKEND: JVM_IR
// This test is needed to check that IrCompileTimeChecker will not fail trying to find and analyze correct toString method
object Obj {
@@ -6,8 +7,6 @@ object Obj {
fun Int.toString(): String = "Not OK"
}
const val a = 1 // this is a dummy const to avoid check in IrInterpreterDumpHandler
fun box(): String {
return "" + "$Obj" // force a call
}
@@ -27128,6 +27128,26 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter")
@TestDataPath("$PROJECT_ROOT")
public class InvolvesIrInterpreter {
@Test
public void testAllFilesPresentInInvolvesIrInterpreter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck")
@TestDataPath("$PROJECT_ROOT")
public class DumpIrAndCheck {
@Test
public void testAllFilesPresentInDumpIrAndCheck() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/ir")
@TestDataPath("$PROJECT_ROOT")
@@ -263,12 +263,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/annotations/kt25489.kt");
}
@Test
@TestMetadata("kt55108.kt")
public void testKt55108() throws Exception {
runTest("compiler/testData/codegen/box/annotations/kt55108.kt");
}
@Test
@TestMetadata("mustBeDocumented.kt")
public void testMustBeDocumented() throws Exception {
@@ -8295,12 +8289,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/constants/foldingBinaryOpsUnsignedConst.kt");
}
@Test
@TestMetadata("kt53480.kt")
public void testKt53480() throws Exception {
runTest("compiler/testData/codegen/box/constants/kt53480.kt");
}
@Test
@TestMetadata("kt9532.kt")
public void testKt9532() throws Exception {
@@ -17123,12 +17111,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/evaluate/plus.kt");
}
@Test
@TestMetadata("referenceNameFromStaticInDifferentModule.kt")
public void testReferenceNameFromStaticInDifferentModule() throws Exception {
runTest("compiler/testData/codegen/box/evaluate/referenceNameFromStaticInDifferentModule.kt");
}
@Test
@TestMetadata("rem.kt")
public void testRem() throws Exception {
@@ -17141,18 +17123,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/evaluate/simpleCallBinary.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
runTest("compiler/testData/codegen/box/evaluate/stringConcatenationWithObject.kt");
}
@Test
@TestMetadata("thisPlusString.kt")
public void testThisPlusString() throws Exception {
runTest("compiler/testData/codegen/box/evaluate/thisPlusString.kt");
}
@Test
@TestMetadata("unaryMinus.kt")
public void testUnaryMinus() throws Exception {
@@ -28106,6 +28076,170 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter")
@TestDataPath("$PROJECT_ROOT")
public class InvolvesIrInterpreter {
@Test
public void testAllFilesPresentInInvolvesIrInterpreter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("kt53480.kt")
public void testKt53480() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/kt53480.kt");
}
@Test
@TestMetadata("kt55108.kt")
public void testKt55108() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/kt55108.kt");
}
@Test
@TestMetadata("referenceNameFromStaticInDifferentModule.kt")
public void testReferenceNameFromStaticInDifferentModule() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/referenceNameFromStaticInDifferentModule.kt");
}
@Test
@TestMetadata("stringConcatenationWithObject.kt")
public void testStringConcatenationWithObject() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/stringConcatenationWithObject.kt");
}
@Test
@TestMetadata("thisPlusString.kt")
public void testThisPlusString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/thisPlusString.kt");
}
@Test
@TestMetadata("useCorrectToString.kt")
public void testUseCorrectToString() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/useCorrectToString.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck")
@TestDataPath("$PROJECT_ROOT")
public class DumpIrAndCheck {
@Test
public void testAllFilesPresentInDumpIrAndCheck() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("booleanOperations.kt")
public void testBooleanOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/booleanOperations.kt");
}
@Test
@TestMetadata("byteOperations.kt")
public void testByteOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/byteOperations.kt");
}
@Test
@TestMetadata("charOperations.kt")
public void testCharOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/charOperations.kt");
}
@Test
@TestMetadata("constTrimIndent.kt")
public void testConstTrimIndent() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/constTrimIndent.kt");
}
@Test
@TestMetadata("constTrimMargin.kt")
public void testConstTrimMargin() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/constTrimMargin.kt");
}
@Test
@TestMetadata("doubleOperations.kt")
public void testDoubleOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/doubleOperations.kt");
}
@Test
@TestMetadata("enumName.kt")
public void testEnumName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/enumName.kt");
}
@Test
@TestMetadata("enumRecursiveName.kt")
public void testEnumRecursiveName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/enumRecursiveName.kt");
}
@Test
@TestMetadata("floatOperations.kt")
public void testFloatOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/floatOperations.kt");
}
@Test
@TestMetadata("ifConstVal.kt")
public void testIfConstVal() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/ifConstVal.kt");
}
@Test
@TestMetadata("intOperations.kt")
public void testIntOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/intOperations.kt");
}
@Test
@TestMetadata("kCallableName.kt")
public void testKCallableName() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/kCallableName.kt");
}
@Test
@TestMetadata("kt53272.kt")
public void testKt53272() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/kt53272.kt");
}
@Test
@TestMetadata("longOperations.kt")
public void testLongOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/longOperations.kt");
}
@Test
@TestMetadata("shortOperations.kt")
public void testShortOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/shortOperations.kt");
}
@Test
@TestMetadata("stdlibConst.kt")
public void testStdlibConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt");
}
@Test
@TestMetadata("stringOperations.kt")
public void testStringOperations() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stringOperations.kt");
}
@Test
@TestMetadata("unsignedConst.kt")
public void testUnsignedConst() throws Exception {
runTest("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/unsignedConst.kt");
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/ir")
@TestDataPath("$PROJECT_ROOT")
@@ -5,7 +5,6 @@
package org.jetbrains.kotlin.test.backend.handlers
import org.jetbrains.kotlin.fir.descriptors.FirModuleDescriptor
import org.jetbrains.kotlin.test.directives.CodegenTestDirectives
import org.jetbrains.kotlin.test.model.BinaryArtifacts
import org.jetbrains.kotlin.test.model.TestModule
@@ -5,6 +5,7 @@
package org.jetbrains.kotlin.test.runners.codegen
import org.jetbrains.kotlin.backend.jvm.lower.constEvaluationPhase
import org.jetbrains.kotlin.config.JvmTarget
import org.jetbrains.kotlin.test.Constructor
import org.jetbrains.kotlin.test.TargetBackend
@@ -12,19 +13,19 @@ import org.jetbrains.kotlin.test.TestJdkKind
import org.jetbrains.kotlin.test.backend.BlackBoxCodegenSuppressor
import org.jetbrains.kotlin.test.backend.handlers.BytecodeListingHandler
import org.jetbrains.kotlin.test.backend.handlers.BytecodeTextHandler
import org.jetbrains.kotlin.test.backend.handlers.IrInterpreterDumpHandler
import org.jetbrains.kotlin.test.bind
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
import org.jetbrains.kotlin.test.builders.configureClassicFrontendHandlersStep
import org.jetbrains.kotlin.test.builders.configureFirHandlersStep
import org.jetbrains.kotlin.test.builders.configureJvmArtifactsHandlersStep
import org.jetbrains.kotlin.test.directives.CodegenTestDirectives
import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.IGNORE_DEXING
import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.USE_JAVAC_BASED_ON_JVM_TARGET
import org.jetbrains.kotlin.test.directives.ConfigurationDirectives.WITH_STDLIB
import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.DIAGNOSTICS
import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives.REPORT_ONLY_EXPLICITLY_DEFINED_DEBUG_INFO
import org.jetbrains.kotlin.test.directives.ForeignAnnotationsDirectives
import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives
import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.WITH_FOREIGN_ANNOTATIONS
import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.ENABLE_DEBUG_MODE
import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.JDK_KIND
import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.JVM_TARGET
@@ -100,6 +101,15 @@ abstract class AbstractJvmBlackBoxCodegenTestBase<R : ResultingArtifact.Frontend
useConfigurators(::JvmForeignAnnotationsConfigurator)
}
forTestsMatching("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/*") {
defaultDirectives {
CodegenTestDirectives.DUMP_IR_FOR_GIVEN_PHASES with constEvaluationPhase
}
configureJvmArtifactsHandlersStep {
useHandlers(::IrInterpreterDumpHandler)
}
}
enableMetaInfoHandler()
}
@@ -1,57 +0,0 @@
/*
* 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 org.jetbrains.kotlin.backend.jvm.lower.constEvaluationPhase
import org.jetbrains.kotlin.test.Constructor
import org.jetbrains.kotlin.test.TargetBackend
import org.jetbrains.kotlin.test.backend.handlers.IrInterpreterDumpHandler
import org.jetbrains.kotlin.test.backend.ir.IrBackendInput
import org.jetbrains.kotlin.test.backend.ir.JvmIrBackendFacade
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
import org.jetbrains.kotlin.test.builders.configureJvmArtifactsHandlersStep
import org.jetbrains.kotlin.test.directives.CodegenTestDirectives.DUMP_IR_FOR_GIVEN_PHASES
import org.jetbrains.kotlin.test.frontend.fir.Fir2IrResultsConverter
import org.jetbrains.kotlin.test.frontend.fir.FirFrontendFacade
import org.jetbrains.kotlin.test.frontend.fir.FirOutputArtifact
import org.jetbrains.kotlin.test.model.*
import org.jetbrains.kotlin.test.runners.codegen.AbstractJvmBlackBoxCodegenTestBase
import org.jetbrains.kotlin.test.services.configuration.CommonEnvironmentConfigurator
import org.jetbrains.kotlin.test.services.configuration.JvmEnvironmentConfigurator
open class AbstractLoweredIrInterpreterTest : AbstractJvmBlackBoxCodegenTestBase<FirOutputArtifact, IrBackendInput>(
FrontendKinds.FIR,
TargetBackend.JVM_IR
) {
override val frontendFacade: Constructor<FrontendFacade<FirOutputArtifact>>
get() = ::FirFrontendFacade
override val frontendToBackendConverter: Constructor<Frontend2BackendConverter<FirOutputArtifact, IrBackendInput>>
get() = ::Fir2IrResultsConverter
override val backendFacade: Constructor<BackendFacade<IrBackendInput, BinaryArtifacts.Jvm>>
get() = ::JvmIrBackendFacade
override fun configure(builder: TestConfigurationBuilder) {
super.configure(builder)
with(builder) {
useConfigurators(
::CommonEnvironmentConfigurator,
::JvmEnvironmentConfigurator
)
forTestsMatching("compiler/testData/ir/loweredIr/interpreter/*") {
defaultDirectives {
DUMP_IR_FOR_GIVEN_PHASES with constEvaluationPhase
}
}
configureJvmArtifactsHandlersStep {
useHandlers(::IrInterpreterDumpHandler)
}
}
}
}
@@ -29,7 +29,10 @@ abstract class AbstractLightAnalysisModeTest : CodegenTestCase() {
override fun doMultiFileTest(wholeFile: File, files: List<TestFile>) {
for (file in files) {
if (file.content.contains("// IGNORE_LIGHT_ANALYSIS") || file.content.contains("// MODULE:")) {
if (file.content.contains("// IGNORE_LIGHT_ANALYSIS") ||
file.content.contains("// MODULE:") ||
file.content.contains("// TARGET_FRONTEND: FIR")
) {
return
}
}
@@ -13,7 +13,6 @@ import org.jetbrains.kotlin.test.runners.codegen.*
import org.jetbrains.kotlin.test.runners.ir.AbstractFir2IrTextTest
import org.jetbrains.kotlin.test.runners.ir.AbstractIrTextTest
import org.jetbrains.kotlin.test.runners.ir.AbstractLightTreeFir2IrTextTest
import org.jetbrains.kotlin.test.runners.ir.AbstractLoweredIrInterpreterTest
import org.jetbrains.kotlin.test.runners.ir.interpreter.AbstractJvmIrInterpreterAfterFir2IrTest
import org.jetbrains.kotlin.test.runners.ir.interpreter.AbstractJvmIrInterpreterAfterPsi2IrTest
import org.jetbrains.kotlin.test.utils.CUSTOM_TEST_DATA_EXTENSION_PATTERN
@@ -266,10 +265,6 @@ fun generateJUnit5CompilerTests(args: Array<String>) {
model("debug/localVariables")
}
testClass<AbstractLoweredIrInterpreterTest> {
model("ir/loweredIr")
}
testClass<AbstractFirDiagnosticsTestWithJvmIrBackend> {
model("diagnostics/firTestWithJvmBackend")
}
@@ -22870,6 +22870,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
}
}
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class InvolvesIrInterpreter extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInInvolvesIrInterpreter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class DumpIrAndCheck extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInDumpIrAndCheck() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
}
}
@TestMetadata("compiler/testData/codegen/box/ir")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -20968,6 +20968,26 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter")
@TestDataPath("$PROJECT_ROOT")
public class InvolvesIrInterpreter {
@Test
public void testAllFilesPresentInInvolvesIrInterpreter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck")
@TestDataPath("$PROJECT_ROOT")
public class DumpIrAndCheck {
@Test
public void testAllFilesPresentInDumpIrAndCheck() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/ir")
@TestDataPath("$PROJECT_ROOT")
@@ -20986,6 +20986,26 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter")
@TestDataPath("$PROJECT_ROOT")
public class InvolvesIrInterpreter {
@Test
public void testAllFilesPresentInInvolvesIrInterpreter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck")
@TestDataPath("$PROJECT_ROOT")
public class DumpIrAndCheck {
@Test
public void testAllFilesPresentInDumpIrAndCheck() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/ir")
@TestDataPath("$PROJECT_ROOT")
@@ -20986,6 +20986,26 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter")
@TestDataPath("$PROJECT_ROOT")
public class InvolvesIrInterpreter {
@Test
public void testAllFilesPresentInInvolvesIrInterpreter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck")
@TestDataPath("$PROJECT_ROOT")
public class DumpIrAndCheck {
@Test
public void testAllFilesPresentInDumpIrAndCheck() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/ir")
@TestDataPath("$PROJECT_ROOT")
@@ -20986,6 +20986,26 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter")
@TestDataPath("$PROJECT_ROOT")
public class InvolvesIrInterpreter {
@Test
public void testAllFilesPresentInInvolvesIrInterpreter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck")
@TestDataPath("$PROJECT_ROOT")
public class DumpIrAndCheck {
@Test
public void testAllFilesPresentInDumpIrAndCheck() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/ir")
@TestDataPath("$PROJECT_ROOT")
@@ -18628,6 +18628,32 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
}
}
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class InvolvesIrInterpreter extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInInvolvesIrInterpreter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class DumpIrAndCheck extends AbstractIrCodegenBoxWasmTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.WASM, testDataFilePath);
}
public void testAllFilesPresentInDumpIrAndCheck() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
}
}
@TestMetadata("compiler/testData/codegen/box/ir")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -23936,6 +23936,32 @@ public class K2NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTes
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter")
@TestDataPath("$PROJECT_ROOT")
@Tag("codegenK2")
@UseExtTestCaseGroupProvider()
@K2Pipeline()
public class InvolvesIrInterpreter {
@Test
public void testAllFilesPresentInInvolvesIrInterpreter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck")
@TestDataPath("$PROJECT_ROOT")
@Tag("codegenK2")
@UseExtTestCaseGroupProvider()
@K2Pipeline()
public class DumpIrAndCheck {
@Test
public void testAllFilesPresentInDumpIrAndCheck() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/ir")
@TestDataPath("$PROJECT_ROOT")
@@ -23703,6 +23703,30 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter")
@TestDataPath("$PROJECT_ROOT")
@Tag("codegen")
@UseExtTestCaseGroupProvider()
public class InvolvesIrInterpreter {
@Test
public void testAllFilesPresentInInvolvesIrInterpreter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck")
@TestDataPath("$PROJECT_ROOT")
@Tag("codegen")
@UseExtTestCaseGroupProvider()
public class DumpIrAndCheck {
@Test
public void testAllFilesPresentInDumpIrAndCheck() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/ir")
@TestDataPath("$PROJECT_ROOT")