Fix BB test auto-generation (ignore backend FIR)
This commit is contained in:
+5
-2
@@ -72,9 +72,12 @@ public class GenerateRangesCodegenTestData {
|
|||||||
private static final Map<String, String> MIN_MAX_CONSTANTS = new LinkedHashMap<>();
|
private static final Map<String, String> MIN_MAX_CONSTANTS = new LinkedHashMap<>();
|
||||||
|
|
||||||
private static final List<String> FIR_PASSING_LITERAL_TESTS =
|
private static final List<String> FIR_PASSING_LITERAL_TESTS =
|
||||||
Arrays.asList("emptyDownto", "emptyRange", "oneElementDownTo", "oneElementRange", "openRange",
|
Arrays.asList("emptyDownto", "emptyRange", "inexactSteppedDownTo", "inexactSteppedRange",
|
||||||
|
"oneElementDownTo", "oneElementRange", "openRange",
|
||||||
"reversedBackSequence", "reversedEmptyBackSequence", "reversedEmptyRange",
|
"reversedBackSequence", "reversedEmptyBackSequence", "reversedEmptyRange",
|
||||||
"reversedRange", "simpleDownTo", "simpleRange", "simpleRangeWithNonConstantEnds");
|
"reversedInexactSteppedDownTo", "reversedRange", "reversedSimpleSteppedRange",
|
||||||
|
"simpleDownTo", "simpleRange", "simpleRangeWithNonConstantEnds",
|
||||||
|
"simpleSteppedDownTo", "simpleSteppedRange");
|
||||||
private static final List<String> FIR_PASSING_EXPRESSION_TESTS =
|
private static final List<String> FIR_PASSING_EXPRESSION_TESTS =
|
||||||
Arrays.asList("emptyDownto", "emptyRange", "inexactSteppedDownTo", "inexactSteppedRange",
|
Arrays.asList("emptyDownto", "emptyRange", "inexactSteppedDownTo", "inexactSteppedRange",
|
||||||
"oneElementDownTo", "oneElementRange", "openRange",
|
"oneElementDownTo", "oneElementRange", "openRange",
|
||||||
|
|||||||
+7
-1
@@ -147,6 +147,12 @@ object GenerateSteppedRangesCodegenTestData {
|
|||||||
subdir: String? = null
|
subdir: String? = null
|
||||||
) = listOf(true, false).forEach { generateTestsForFunction(fileName, typeToBuilderMap, function, extraCode, subdir, asLiteral = it) }
|
) = listOf(true, false).forEach { generateTestsForFunction(fileName, typeToBuilderMap, function, extraCode, subdir, asLiteral = it) }
|
||||||
|
|
||||||
|
private val ignoredFrondendIRFiles = setOf(
|
||||||
|
"maxValueToMinValueStepMaxValue.kt", "maxValueToOneStepMaxValue.kt", "maxValueToZeroStepMaxValue.kt",
|
||||||
|
"minValueToMaxValueStepMaxValue.kt", "oneToMaxValueStepMaxValue.kt", "zeroToMaxValueStepMaxValue.kt",
|
||||||
|
"emptyProgressionToMinValue.kt"
|
||||||
|
)
|
||||||
|
|
||||||
private fun generateTestsForFunction(
|
private fun generateTestsForFunction(
|
||||||
fileName: String,
|
fileName: String,
|
||||||
typeToBuilderMap: Map<Type, TestBuilder>,
|
typeToBuilderMap: Map<Type, TestBuilder>,
|
||||||
@@ -164,7 +170,7 @@ object GenerateSteppedRangesCodegenTestData {
|
|||||||
fullSubdir.mkdirs()
|
fullSubdir.mkdirs()
|
||||||
PrintWriter(File(fullSubdir, fileName)).use {
|
PrintWriter(File(fullSubdir, fileName)).use {
|
||||||
with(it) {
|
with(it) {
|
||||||
if (fullSubdirPath.contains("expression") || (fileName != "stepOne.kt" && fileName != "stepOneThenStepOne.kt")) {
|
if (fileName in ignoredFrondendIRFiles) {
|
||||||
println("// IGNORE_BACKEND_FIR: JVM_IR")
|
println("// IGNORE_BACKEND_FIR: JVM_IR")
|
||||||
}
|
}
|
||||||
println("// $PREAMBLE_MESSAGE")
|
println("// $PREAMBLE_MESSAGE")
|
||||||
|
|||||||
Reference in New Issue
Block a user