Fix black box test data generation (IGNORE_BACKEND_FIR)
This commit is contained in:
+2
-17
@@ -70,21 +70,6 @@ public class GenerateRangesCodegenTestData {
|
||||
private static final Map<String, String> ELEMENT_TYPE_KNOWN_SUBSTRINGS = new HashMap<>();
|
||||
private static final Map<String, String> MIN_MAX_CONSTANTS = new LinkedHashMap<>();
|
||||
|
||||
private static final List<String> FIR_PASSING_LITERAL_TESTS =
|
||||
Arrays.asList("emptyDownto", "emptyRange", "inexactSteppedDownTo", "inexactSteppedRange",
|
||||
"oneElementDownTo", "oneElementRange", "openRange",
|
||||
"reversedBackSequence", "reversedEmptyBackSequence", "reversedEmptyRange",
|
||||
"reversedInexactSteppedDownTo", "reversedRange", "reversedSimpleSteppedRange",
|
||||
"simpleDownTo", "simpleRange", "simpleRangeWithNonConstantEnds",
|
||||
"simpleSteppedDownTo", "simpleSteppedRange");
|
||||
private static final List<String> FIR_PASSING_EXPRESSION_TESTS =
|
||||
Arrays.asList("emptyDownto", "emptyRange", "inexactSteppedDownTo", "inexactSteppedRange",
|
||||
"oneElementDownTo", "oneElementRange", "openRange",
|
||||
"reversedBackSequence", "reversedEmptyBackSequence", "reversedEmptyRange",
|
||||
"reversedInexactSteppedDownTo", "reversedRange", "reversedSimpleSteppedRange",
|
||||
"simpleDownTo", "simpleRange", "simpleRangeWithNonConstantEnds",
|
||||
"simpleSteppedDownTo", "simpleSteppedRange");
|
||||
|
||||
private static final List<String> FIR_PASSING_UNSIGNED_LITERAL_TESTS =
|
||||
Arrays.asList("emptyDownto", "emptyRange", "reversedEmptyBackSequence", "reversedEmptyRange");
|
||||
|
||||
@@ -247,8 +232,8 @@ public class GenerateRangesCodegenTestData {
|
||||
}
|
||||
|
||||
String fileName = testFunName + ".kt";
|
||||
writeToFile(new File(AS_LITERAL_DIR, fileName), asLiteralBody.toString(), false, !FIR_PASSING_LITERAL_TESTS.contains(testFunName));
|
||||
writeToFile(new File(AS_EXPRESSION_DIR, fileName), asExpressionBody.toString(), false, !FIR_PASSING_EXPRESSION_TESTS.contains(testFunName));
|
||||
writeToFile(new File(AS_LITERAL_DIR, fileName), asLiteralBody.toString(), false, false);
|
||||
writeToFile(new File(AS_EXPRESSION_DIR, fileName), asExpressionBody.toString(), false, false);
|
||||
writeToFile(new File(UNSIGNED_AS_LITERAL_DIR, fileName), unsignedAsLiteralBody.toString(), true, !FIR_PASSING_UNSIGNED_LITERAL_TESTS.contains(testFunName));
|
||||
writeToFile(new File(UNSIGNED_AS_EXPRESSION_DIR, fileName), unsignedAsExpressionBody.toString(), true, !FIR_PASSING_UNSIGNED_EXPRESSION_TESTS.contains(testFunName));
|
||||
}
|
||||
|
||||
-9
@@ -147,12 +147,6 @@ object GenerateSteppedRangesCodegenTestData {
|
||||
subdir: String? = null
|
||||
) = 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(
|
||||
fileName: String,
|
||||
typeToBuilderMap: Map<Type, TestBuilder>,
|
||||
@@ -170,9 +164,6 @@ object GenerateSteppedRangesCodegenTestData {
|
||||
fullSubdir.mkdirs()
|
||||
PrintWriter(File(fullSubdir, fileName)).use {
|
||||
with(it) {
|
||||
if (fileName in ignoredFrondendIRFiles) {
|
||||
println("// IGNORE_BACKEND_FIR: JVM_IR")
|
||||
}
|
||||
println("// $PREAMBLE_MESSAGE")
|
||||
println("// KJS_WITH_FULL_RUNTIME")
|
||||
println("// WITH_RUNTIME")
|
||||
|
||||
Reference in New Issue
Block a user