Browse Source

Skip iterations inside testsuite, only correct value check is needed in that case

Pierre Muller 3 months ago
parent
commit
ec0ac70df3
3 changed files with 5 additions and 0 deletions
  1. 4 0
      tests/bench/bfloatfunc.pp
  2. BIN
      tests/test/cg/tfloatfunc
  3. 1 0
      tests/test/cg/tfloatfunc.pp

+ 4 - 0
tests/bench/bfloatfunc.pp

@@ -31,7 +31,11 @@ function IIf(Condition: Boolean; TrueRes, FalseRes: Integer): Integer; inline;
   end;
 
 const
+{$ifdef IN_TESTS}
+  ITERATIONS = 1;
+{$else}
   ITERATIONS = 33554432;
+{$endif}
 
 { TTestAncestor }
 type

BIN
tests/test/cg/tfloatfunc


+ 1 - 0
tests/test/cg/tfloatfunc.pp

@@ -1,3 +1,4 @@
 { %OPT=-O3 }
 { this benchmark can be used also as a test case }
+{$define IN_TESTS}
 {$I ../../bench/bfloatfunc.pp}