Add IGNORE_BACKEND directive for native automatically
Also parse correctly case IGNORE_BACKEND: JS, NATIVE
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,8 @@
|
|||||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||||
// IGNORE_BACKEND: JS, NATIVE
|
// IGNORE_BACKEND: JS
|
||||||
|
|
||||||
|
// TODO: muted automatically, investigate should it be ran for NATIVE or not
|
||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
|
||||||
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
// Auto-generated by org.jetbrains.kotlin.generators.tests.GenerateRangesCodegenTestData. DO NOT EDIT!
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2015 JetBrains s.r.o.
|
* Copyright 2010-2017 JetBrains s.r.o.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -236,7 +236,7 @@ public final class InTextDirectivesUtils {
|
|||||||
private static boolean isIgnoredTargetByPrefix(TargetBackend targetBackend, File file, String prefix) {
|
private static boolean isIgnoredTargetByPrefix(TargetBackend targetBackend, File file, String prefix) {
|
||||||
if (targetBackend == TargetBackend.ANY) return false;
|
if (targetBackend == TargetBackend.ANY) return false;
|
||||||
|
|
||||||
List<String> ignoredBackends = findLinesWithPrefixesRemoved(textWithDirectives(file), prefix);
|
List<String> ignoredBackends = findListWithPrefixes(textWithDirectives(file), prefix);
|
||||||
return ignoredBackends.contains(targetBackend.name());
|
return ignoredBackends.contains(targetBackend.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+24
-4
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2015 JetBrains s.r.o.
|
* Copyright 2010-2017 JetBrains s.r.o.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -118,6 +118,24 @@ public class GenerateRangesCodegenTestData {
|
|||||||
"progressionMaxValueToMinValue.kt",
|
"progressionMaxValueToMinValue.kt",
|
||||||
"progressionMinValueToMinValue.kt");
|
"progressionMinValueToMinValue.kt");
|
||||||
|
|
||||||
|
private static final List<String> IGNORED_FOR_NATIVE_BACKEND = Arrays.asList(
|
||||||
|
"inexactDownToMinValue.kt",
|
||||||
|
"inexactToMaxValue.kt",
|
||||||
|
"maxValueMinusTwoToMaxValue.kt",
|
||||||
|
"maxValueToMaxValue.kt",
|
||||||
|
"maxValueToMinValue.kt",
|
||||||
|
"progressionDownToMinValue.kt",
|
||||||
|
"progressionMaxValueMinusTwoToMaxValue.kt",
|
||||||
|
"progressionMaxValueToMaxValue.kt",
|
||||||
|
"progressionMaxValueToMinValue.kt",
|
||||||
|
"progressionMinValueToMinValue.kt"
|
||||||
|
);
|
||||||
|
|
||||||
|
private static void writeIgnoreBackendDirective(PrintWriter out, String backendName) {
|
||||||
|
out.printf("// TODO: muted automatically, investigate should it be ran for %s or not%n", backendName);
|
||||||
|
out.printf("// IGNORE_BACKEND: %s%n%n", backendName);
|
||||||
|
}
|
||||||
|
|
||||||
private static void writeToFile(File file, String generatedBody) {
|
private static void writeToFile(File file, String generatedBody) {
|
||||||
PrintWriter out;
|
PrintWriter out;
|
||||||
try {
|
try {
|
||||||
@@ -129,10 +147,12 @@ public class GenerateRangesCodegenTestData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (IGNORED_FOR_JS_BACKEND.contains(file.getName())) {
|
if (IGNORED_FOR_JS_BACKEND.contains(file.getName())) {
|
||||||
out.println("// TODO: muted automatically, investigate should it be ran for JS or not");
|
writeIgnoreBackendDirective(out, "JS");
|
||||||
out.println("// IGNORE_BACKEND: JS");
|
|
||||||
out.println();
|
|
||||||
}
|
}
|
||||||
|
if (IGNORED_FOR_NATIVE_BACKEND.contains(file.getName())) {
|
||||||
|
writeIgnoreBackendDirective(out, "NATIVE");
|
||||||
|
}
|
||||||
|
|
||||||
out.println("// Auto-generated by " + GenerateRangesCodegenTestData.class.getName() + ". DO NOT EDIT!");
|
out.println("// Auto-generated by " + GenerateRangesCodegenTestData.class.getName() + ". DO NOT EDIT!");
|
||||||
out.println("// WITH_RUNTIME");
|
out.println("// WITH_RUNTIME");
|
||||||
out.println();
|
out.println();
|
||||||
|
|||||||
Reference in New Issue
Block a user