Browse Source

* run test with different options as it is tricky

florian 1 year ago
parent
commit
f28cbbf73b
3 changed files with 5 additions and 2 deletions
  1. 0 2
      tests/test/minmax.inc
  2. 2 0
      tests/test/tminmax1.pp
  3. 3 0
      tests/test/tminmax2.pp

+ 0 - 2
tests/test/tminmax.pp → tests/test/minmax.inc

@@ -1,5 +1,3 @@
-{ %opt=-Oonofastmath }  { with fast math, the operands of min/max might be swapped and this breaks the tests using NaN }
-
 {$mode objfpc}
 uses
   Math;

+ 2 - 0
tests/test/tminmax1.pp

@@ -0,0 +1,2 @@
+{ %opt=-O- -O1 }  { ensure we test code generation without constant propagation }
+{$I minmax.inc }

+ 3 - 0
tests/test/tminmax2.pp

@@ -0,0 +1,3 @@
+{ %opt=-Oonofastmath -O3 }  { with fast math, the operands of min/max might be swapped and this breaks the tests using NaN,
+                              but test constant propagation and thus simplification }
+{$I minmax.inc }