Generate min/max constants as non-const in ranges tests

in order to make them appear as unknown values to codegen.
This commit is contained in:
pyos
2020-10-05 15:18:46 +02:00
committed by Alexander Udalov
parent 260f66183c
commit 4a03006162
49 changed files with 215 additions and 213 deletions
@@ -159,7 +159,9 @@ public class GenerateRangesCodegenTestData {
out.println();
MIN_MAX_CONSTANTS.forEach((name, value) -> {
if (generatedBody.contains(name)) {
out.printf("const val %s = %s", name, value).println();
// They are intentionally added as non-const vals rather than direct references to MIN_VALUE/MAX_VALUE
// in order to fool constant evaluation.
out.printf("val %s = %s", name, value).println();
}
});