Browse Source

Mass trailing space removal for tests.

Margers 1 week ago
parent
commit
d8d6c7958f
100 changed files with 549 additions and 549 deletions
  1. 4 4
      tests/bench/bdiv_s32.inc
  2. 23 23
      tests/bench/bdiv_s64.inc
  3. 9 9
      tests/bench/bdiv_u32.inc
  4. 10 10
      tests/bench/bdiv_u64.inc
  5. 87 87
      tests/bench/bfloatfunc.pp
  6. 1 1
      tests/bench/bval.pp
  7. 1 1
      tests/bench/shootout/obsolete/random.pp
  8. 2 2
      tests/bench/shootout/src/mandelbrot.pp
  9. 3 3
      tests/bench/shootout/src/message.pp
  10. 1 1
      tests/bench/shootout/src/thread_ring.pp
  11. 2 2
      tests/bench/shortbench.pp
  12. 8 8
      tests/bench/stream.pp
  13. 2 2
      tests/tbf/tb0210.pp
  14. 2 2
      tests/tbf/tb0210a.pp
  15. 1 1
      tests/tbf/tb0211.pp
  16. 1 1
      tests/tbf/tb0211a.pp
  17. 2 2
      tests/tbf/tb0234.pp
  18. 1 1
      tests/tbf/tb0246.pp
  19. 1 1
      tests/tbf/tb0274.pp
  20. 1 1
      tests/tbf/tb0285.pp
  21. 4 4
      tests/tbf/ub0234.pp
  22. 4 4
      tests/tbf/ub0234.ub0234.pp
  23. 4 4
      tests/tbs/ib0690.inc
  24. 1 1
      tests/tbs/tb0193.pp
  25. 1 1
      tests/tbs/tb0259.pp
  26. 1 1
      tests/tbs/tb0336.pp
  27. 1 1
      tests/tbs/tb0494.pp
  28. 1 1
      tests/tbs/tb0508.pp
  29. 2 2
      tests/tbs/tb0531.pp
  30. 1 1
      tests/tbs/tb0536.pp
  31. 1 1
      tests/tbs/tb0547.pp
  32. 2 2
      tests/tbs/tb0554.pp
  33. 2 2
      tests/tbs/tb0587.pp
  34. 1 1
      tests/tbs/tb0592.pp
  35. 1 1
      tests/tbs/tb0593.pp
  36. 1 1
      tests/tbs/tb0597.pp
  37. 1 1
      tests/tbs/tb0609.pp
  38. 1 1
      tests/tbs/tb0621.pp
  39. 2 2
      tests/tbs/tb0631.pp
  40. 1 1
      tests/tbs/tb0660.pp
  41. 1 1
      tests/tbs/tb0664.pp
  42. 5 5
      tests/tbs/tb0679.pp
  43. 2 2
      tests/tbs/tb0682.pp
  44. 4 4
      tests/tbs/tb0693a.pp
  45. 4 4
      tests/tbs/tb0693b.pp
  46. 2 2
      tests/test/alglib/t_testconvunit.pp
  47. 2 2
      tests/test/alglib/t_testcorrunit.pp
  48. 2 2
      tests/test/alglib/t_testfftunit.pp
  49. 2 2
      tests/test/alglib/t_testfhtunit.pp
  50. 54 54
      tests/test/alglib/u_conv.pp
  51. 5 5
      tests/test/alglib/u_corr.pp
  52. 17 17
      tests/test/alglib/u_fft.pp
  53. 6 6
      tests/test/alglib/u_fht.pp
  54. 29 29
      tests/test/alglib/u_ftbase.pp
  55. 15 15
      tests/test/alglib/u_testconvunit.pp
  56. 4 4
      tests/test/alglib/u_testcorrunit.pp
  57. 11 11
      tests/test/alglib/u_testfftunit.pp
  58. 6 6
      tests/test/alglib/u_testfhtunit.pp
  59. 2 2
      tests/test/cg/obj/readme.txt
  60. 2 2
      tests/test/cg/tadint64.pp
  61. 12 12
      tests/test/cg/tcalcla1.pp
  62. 1 1
      tests/test/cg/tcalext.pp
  63. 60 60
      tests/test/cg/tcnvint1.pp
  64. 5 5
      tests/test/cg/tcond1.pp
  65. 1 1
      tests/test/cg/tcond2.pp
  66. 1 1
      tests/test/cg/tcond2a.pp
  67. 3 3
      tests/test/cg/tctr1.pp
  68. 3 3
      tests/test/cg/tctr1a.pp
  69. 5 5
      tests/test/cg/testcompo.pp
  70. 31 31
      tests/test/cg/tmoddiv2.pp
  71. 21 21
      tests/test/cg/toverflow.inc
  72. 4 4
      tests/test/cg/tpara2.pp
  73. 2 2
      tests/test/cg/tsmallrec.pp
  74. 4 4
      tests/test/cg/ttryfin5.pp
  75. 1 1
      tests/test/cg/tval1.pp
  76. 1 1
      tests/test/cg/tval1a.pp
  77. 1 1
      tests/test/cg/tval2.pp
  78. 1 1
      tests/test/cg/tval2a.pp
  79. 1 1
      tests/test/cg/tvec64cmp.pp
  80. 1 1
      tests/test/cg/tvecsimplify1.pp
  81. 1 1
      tests/test/cg/tvecsimplify1a.pp
  82. 1 1
      tests/test/cg/tvecsimplify2.pp
  83. 1 1
      tests/test/cg/tvecsimplify2a.pp
  84. 1 1
      tests/test/cg/tvecsimplify3.pp
  85. 1 1
      tests/test/cg/tvecsimplify4.pp
  86. 1 1
      tests/test/cg/tvectorcall3.pp
  87. 1 1
      tests/test/cg/variants/ivarol10.pp
  88. 1 1
      tests/test/cg/variants/ivarol100.pp
  89. 1 1
      tests/test/cg/variants/ivarol101.pp
  90. 1 1
      tests/test/cg/variants/ivarol102.pp
  91. 1 1
      tests/test/cg/variants/ivarol104.pp
  92. 1 1
      tests/test/cg/variants/ivarol105.pp
  93. 1 1
      tests/test/cg/variants/ivarol106.pp
  94. 1 1
      tests/test/cg/variants/ivarol107.pp
  95. 1 1
      tests/test/cg/variants/ivarol108.pp
  96. 1 1
      tests/test/cg/variants/ivarol109.pp
  97. 1 1
      tests/test/cg/variants/ivarol11.pp
  98. 1 1
      tests/test/cg/variants/ivarol110.pp
  99. 1 1
      tests/test/cg/variants/ivarol111.pp
  100. 1 1
      tests/test/cg/variants/ivarol112.pp

+ 4 - 4
tests/bench/bdiv_s32.inc

@@ -107,7 +107,7 @@ procedure TSInt32Bit1Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 1;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -149,7 +149,7 @@ procedure TSInt32Bit1ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 1;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -191,7 +191,7 @@ procedure TSInt32Bit100Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 100;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -233,7 +233,7 @@ procedure TSInt32Bit100ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 100;
-      
+
     FResultArray[Index] := Answer;
   end;
 

+ 23 - 23
tests/bench/bdiv_s64.inc

@@ -103,7 +103,7 @@ type
 const
   FS64_153Input: array[$0..$F] of Int64 =
     (0, 1, 152, 153, 154, -1, -152, -153, -154,
-    8000000000000000117, 8000000000000000118, 8000000000000000119, 
+    8000000000000000117, 8000000000000000118, 8000000000000000119,
     -8000000000000000117, -8000000000000000118, -8000000000000000119,
     Int64($8000000000000000));
 
@@ -130,7 +130,7 @@ type
 const
   FS64_1461Input: array[$0..$F] of Int64 =
     (0, 1, 1460, 1461, 1462, -1, -1460, -1461, -1462,
-    8000000000000000582, 8000000000000000583, 8000000000000000584, 
+    8000000000000000582, 8000000000000000583, 8000000000000000584,
     -8000000000000000582, -8000000000000000583, -8000000000000000584,
     Int64($8000000000000000));
 
@@ -157,7 +157,7 @@ type
 const
   FS64_10000Input: array[$0..$F] of Int64 =
     (0, 1, 9999, 10000, 10001, -1, -9999, -10000, -10001,
-    7999999999999999999, 8000000000000000000, 8000000000000000001, 
+    7999999999999999999, 8000000000000000000, 8000000000000000001,
     -7999999999999999999, -8000000000000000000, -8000000000000000001,
     Int64($8000000000000000));
 
@@ -179,12 +179,12 @@ type
     public
       function TestTitle: shortstring; override;
   end;
-  
+
   { TSInt64Bit86400000Test }
 const
   FS64_86400000Input: array[$0..$F] of Int64 =
     (0, 1, 86399999, 86400000, 86400001, -1, -86399999, -86400000, -86400001,
-    8639999999999999999, 8640000000000000000, 8640000000000000001, 
+    8639999999999999999, 8640000000000000000, 8640000000000000001,
     -8639999999999999999, -8640000000000000000, -8640000000000000001,
     Int64($8000000000000000));
 
@@ -275,7 +275,7 @@ procedure TSInt64Bit1Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 1;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -317,7 +317,7 @@ procedure TSInt64Bit1ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 1;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -359,7 +359,7 @@ procedure TSInt64Bit10Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 10;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -401,7 +401,7 @@ procedure TSInt64Bit10ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 10;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -427,7 +427,7 @@ procedure TSInt64Bit18Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 18;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -453,7 +453,7 @@ procedure TSInt64Bit18ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 18;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -479,7 +479,7 @@ procedure TSInt64Bit24Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 24;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -505,7 +505,7 @@ procedure TSInt64Bit24ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 24;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -547,7 +547,7 @@ procedure TSInt64Bit100Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 100;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -589,7 +589,7 @@ procedure TSInt64Bit100ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 100;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -615,7 +615,7 @@ procedure TSInt64Bit153Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 153;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -641,7 +641,7 @@ procedure TSInt64Bit153ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 153;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -667,7 +667,7 @@ procedure TSInt64Bit1461Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 1461;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -693,7 +693,7 @@ procedure TSInt64Bit1461ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 1461;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -719,7 +719,7 @@ procedure TSInt64Bit10000Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 10000;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -745,7 +745,7 @@ procedure TSInt64Bit10000ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 10000;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -771,7 +771,7 @@ procedure TSInt64Bit86400000Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 86400000;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -797,7 +797,7 @@ procedure TSInt64Bit86400000ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 86400000;
-      
+
     FResultArray[Index] := Answer;
   end;
 

+ 9 - 9
tests/bench/bdiv_u32.inc

@@ -175,7 +175,7 @@ type
 const
   FU32_146097Input: array[$0..$F] of Cardinal =
     (0, 1, 146096, 146097, 146098, 292193, 292194, 292195,
-    4294959605, 4294959606, 4294959607,    
+    4294959605, 4294959606, 4294959607,
     $7FFFFFFE, $7FFFFFFF, $80000000, $80000001, $FFFFFFFF);
 
 type
@@ -196,7 +196,7 @@ type
     public
       function TestTitle: shortstring; override;
   end;
-  
+
   { TUInt32Bit3600000Test }
 const
   FU32_3600000Input: array[$0..$F] of Cardinal =
@@ -309,7 +309,7 @@ procedure TUInt32Bit1Test.DoTestIteration(Iteration: Integer);
 
     FResultArray[Index] := Answer;
   end;
-  
+
 { TUInt32Bit1Test }
 
 function TUInt32Bit1ModTest.TestTitle: shortstring;
@@ -626,7 +626,7 @@ procedure TUInt32Bit10ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 10;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -662,7 +662,7 @@ procedure TUInt32Bit100Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 100;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -750,7 +750,7 @@ procedure TUInt32Bit1000ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 1000;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -776,7 +776,7 @@ procedure TUInt32Bit60000Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 60000;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -828,7 +828,7 @@ procedure TUInt32Bit146097Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 146097;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -880,7 +880,7 @@ procedure TUInt32Bit3600000Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 3600000;
-      
+
     FResultArray[Index] := Answer;
   end;
 

+ 10 - 10
tests/bench/bdiv_u64.inc

@@ -358,7 +358,7 @@ procedure TUInt64Bit3Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 3;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -392,7 +392,7 @@ procedure TUInt64Bit3ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 3;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -428,7 +428,7 @@ procedure TUInt64Bit7Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 7;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -464,7 +464,7 @@ procedure TUInt64Bit7ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 7;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -500,7 +500,7 @@ procedure TUInt64Bit10Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 10;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -538,7 +538,7 @@ procedure TUInt64Bit10ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 10;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -576,7 +576,7 @@ procedure TUInt64Bit100Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 100;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -614,7 +614,7 @@ procedure TUInt64Bit100ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 100;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -640,7 +640,7 @@ procedure TUInt64Bit1000000000Test.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator div 1000000000;
-      
+
     FResultArray[Index] := Answer;
   end;
 
@@ -666,7 +666,7 @@ procedure TUInt64Bit1000000000ModTest.DoTestIteration(Iteration: Integer);
     FInputArray[Index] := Numerator;
     for X := 0 to INTERNAL_LOOPS - 1 do
       Answer := Numerator mod 1000000000;
-      
+
     FResultArray[Index] := Answer;
   end;
 

+ 87 - 87
tests/bench/bfloatfunc.pp

@@ -81,7 +81,7 @@ type
       procedure DoTestIteration(Iteration: Integer); override;
       function DoFunc(Input1, Input2: Single): Single; virtual; abstract;
   end;
-  
+
   TSingleIntPair = record
     S: Single;
     N: Integer;
@@ -116,7 +116,7 @@ type
       procedure DoTestIteration(Iteration: Integer); override;
       function DoFunc(Input1, Input2: Double): Double; virtual; abstract;
   end;
-  
+
   TDoubleIntPair = record
     D: Double;
     N: Integer;
@@ -174,7 +174,7 @@ type
     public
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat32MaxSpecialTest = class(TFloat32MaxTest)
     public
       constructor Create; override;
@@ -187,7 +187,7 @@ type
     public
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat32SqrtTest = class(TFloat32OneInputTest)
     protected
       function DoFunc(Input: Single): Single; override;
@@ -195,13 +195,13 @@ type
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat32SqrtSpecialTest = class(TFloat32SqrtTest)
     public
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat32LnTest = class(TFloat32OneInputTest)
     protected
       function DoFunc(Input: Single): Single; override;
@@ -209,13 +209,13 @@ type
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat32LnSpecialTest = class(TFloat32LnTest)
     public
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat32ExpTest = class(TFloat32OneInputTest)
     protected
       function DoFunc(Input: Single): Single; override;
@@ -223,13 +223,13 @@ type
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat32ExpSpecialTest = class(TFloat32ExpTest)
     public
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat32SinTest = class(TFloat32OneInputTest)
     protected
       function DoFunc(Input: Single): Single; override;
@@ -237,13 +237,13 @@ type
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat32SinSpecialTest = class(TFloat32SinTest)
     public
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat32CosTest = class(TFloat32OneInputTest)
     protected
       function DoFunc(Input: Single): Single; override;
@@ -251,7 +251,7 @@ type
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat32CosSpecialTest = class(TFloat32CosTest)
     public
       constructor Create; override;
@@ -271,7 +271,7 @@ type
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   { 64-bit floating-point }
   TFloat64MinTest = class(TFloat64TwoInputTest)
     protected
@@ -315,7 +315,7 @@ type
     public
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat64MaxSpecialTest = class(TFloat64MaxTest)
     public
       constructor Create; override;
@@ -328,7 +328,7 @@ type
     public
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat64SqrtTest = class(TFloat64OneInputTest)
     protected
       function DoFunc(Input: Double): Double; override;
@@ -336,13 +336,13 @@ type
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat64SqrtSpecialTest = class(TFloat64SqrtTest)
     public
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat64LnTest = class(TFloat64OneInputTest)
     protected
       function DoFunc(Input: Double): Double; override;
@@ -350,13 +350,13 @@ type
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat64LnSpecialTest = class(TFloat64LnTest)
     public
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat64ExpTest = class(TFloat64OneInputTest)
     protected
       function DoFunc(Input: Double): Double; override;
@@ -364,13 +364,13 @@ type
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat64ExpSpecialTest = class(TFloat64ExpTest)
     public
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat64SinTest = class(TFloat64OneInputTest)
     protected
       function DoFunc(Input: Double): Double; override;
@@ -378,13 +378,13 @@ type
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat64SinSpecialTest = class(TFloat64SinTest)
     public
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat64CosTest = class(TFloat64OneInputTest)
     protected
       function DoFunc(Input: Double): Double; override;
@@ -392,7 +392,7 @@ type
       constructor Create; override;
       function TestTitle: shortstring; override;
   end;
-  
+
   TFloat64CosSpecialTest = class(TFloat64CosTest)
     public
       constructor Create; override;
@@ -466,7 +466,7 @@ class function TFloat32Test.IsEqual(Value, Reference: Single): Boolean;
     else
       Epsilon := Power(2, Floor(Ln(Reference) / Ln(2)) - 18);
 
-    Result := Abs(Value - Reference) <= Epsilon; { If Value is NaN, Result will be set to False } 
+    Result := Abs(Value - Reference) <= Epsilon; { If Value is NaN, Result will be set to False }
   end;
 
 function TFloat32Test.WriteResults: Boolean;
@@ -531,7 +531,7 @@ const
     0.0,
     -1E-4
   );
-  
+
   MAX_EXPECTED: array[0..7] of Single = (
     0.5,
     1048577.0,
@@ -542,7 +542,7 @@ const
     1E-4,
     0.0
   );
-  
+
 constructor TFloat32MinTest.Create;
 begin
   inherited Create;
@@ -554,7 +554,7 @@ function TFloat32MinTest.DoFunc(Input1, Input2: Single): Single;
   begin
     Result := Min(Input1, Input2);
   end;
-  
+
 function TFloat32MinTest.TestTitle: shortstring;
   begin
     Result := 'Min (single-precision)';
@@ -567,7 +567,7 @@ function TFloat32ImplicitMinTest.DoFunc(Input1, Input2: Single): Single;
     else
       Result := Input2;
   end;
-  
+
 function TFloat32ImplicitMinTest.TestTitle: shortstring;
   begin
     Result := 'Implicit Min (single-precision)';
@@ -586,7 +586,7 @@ function TFloat32MaxTest.DoFunc(Input1, Input2: Single): Single;
   begin
     Result := Max(Input1, Input2);
   end;
-  
+
 function TFloat32MaxTest.TestTitle: shortstring;
   begin
     Result := 'Max (single-precision)';
@@ -599,7 +599,7 @@ function TFloat32ImplicitMaxTest.DoFunc(Input1, Input2: Single): Single;
     else
       Result := Input2;
   end;
-  
+
 function TFloat32ImplicitMaxTest.TestTitle: shortstring;
   begin
     Result := 'Implicit Max (single-precision)';
@@ -617,7 +617,7 @@ const
     (Infinity, NegInfinity),
     (NegInfinity, Infinity)
   );
-  
+
   MIN_SPECIAL_EXPECTED: array[0..7] of Single = (
     0.0,
     NaN,
@@ -628,7 +628,7 @@ const
     NegInfinity,
     NegInfinity
   );
-  
+
   MAX_SPECIAL_EXPECTED: array[0..7] of Single = (
     0.0,
     NaN,
@@ -639,14 +639,14 @@ const
     Infinity,
     Infinity
   );
-  
+
 constructor TFloat32MinSpecialTest.Create;
 begin
   inherited Create;
   Move(MINMAX_SPECIAL_INPUTS, FInputs, SizeOf(FInputs));
   Move(MIN_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat32MinSpecialTest.TestTitle: shortstring;
   begin
     Result := 'Min (special single-precision)';
@@ -659,7 +659,7 @@ function TFloat32ImplicitMinSpecialTest.DoFunc(Input1, Input2: Single): Single;
     else
       Result := Input2;
   end;
-  
+
 function TFloat32ImplicitMinSpecialTest.TestTitle: shortstring;
   begin
     Result := 'Implicit Min (special single-precision)';
@@ -673,7 +673,7 @@ begin
   Move(MINMAX_SPECIAL_INPUTS, FInputs, SizeOf(FInputs));
   Move(MAX_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat32MaxSpecialTest.TestTitle: shortstring;
   begin
     Result := 'Max (special single-precision)';
@@ -686,7 +686,7 @@ function TFloat32ImplicitMaxSpecialTest.DoFunc(Input1, Input2: Single): Single;
     else
       Result := Input2;
   end;
-  
+
 function TFloat32ImplicitMaxSpecialTest.TestTitle: shortstring;
   begin
     Result := 'Implicit Max (special single-precision)';
@@ -704,7 +704,7 @@ const
     3.1415926535897932384626433832795, { Pi }
     1.5707963267948966192313216916398 { Pi / 2 }
   );
-  
+
   SQRT_EXPECTED: array[0..7] of Single = (
     2.0,
     1.0,
@@ -727,7 +727,7 @@ function TFloat32SqrtTest.DoFunc(Input: Single): Single;
   begin
     Result := Sqrt(Input);
   end;
-  
+
 function TFloat32SqrtTest.TestTitle: shortstring;
   begin
     Result := 'sqrt(x) (single-precision)';
@@ -745,7 +745,7 @@ const
     1E6,
     NaN
   );
-  
+
   SQRT_SPECIAL_EXPECTED: array[0..7] of Single = (
     0.0,
     Infinity,
@@ -763,7 +763,7 @@ begin
   Move(SQRT_SPECIAL_INPUTS, FInputs, SizeOf(FInputs));
   Move(SQRT_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat32SqrtSpecialTest.TestTitle: shortstring;
   begin
     Result := 'sqrt(x) (special single-precision)';
@@ -771,9 +771,9 @@ function TFloat32SqrtSpecialTest.TestTitle: shortstring;
 
 { TFloat32LnTest }
 
-const  
+const
   LN_EXPECTED: array[0..7] of Single = (
-    1.386294361119891,  
+    1.386294361119891,
     0.0,
     5.545177444479562,
     0.693147180559945,
@@ -794,7 +794,7 @@ function TFloat32LnTest.DoFunc(Input: Single): Single;
   begin
     Result := Ln(Input);
   end;
-  
+
 function TFloat32LnTest.TestTitle: shortstring;
   begin
     Result := 'ln x (single-precision)';
@@ -820,7 +820,7 @@ begin
   Move(SQRT_SPECIAL_INPUTS, FInputs, SizeOf(FInputs)); { Reuse the sqrt inputs }
   Move(LN_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat32LnSpecialTest.TestTitle: shortstring;
   begin
     Result := 'ln x (special single-precision)';
@@ -829,12 +829,12 @@ function TFloat32LnSpecialTest.TestTitle: shortstring;
 { TFloat32ExpTest }
 const
   EXP_EXPECTED: array[0..7] of Single = (
-    54.598150033144239, 
+    54.598150033144239,
     2.718281828459045,
     1.5114276650041035e+111,
     7.3890560989306502,
     2.6881171418161354e+43,
-    1.6487212707001281, 
+    1.6487212707001281,
     23.1406926327792690,
     4.8104773809653517
   );
@@ -850,7 +850,7 @@ function TFloat32ExpTest.DoFunc(Input: Single): Single;
   begin
     Result := Exp(Input);
   end;
-  
+
 function TFloat32ExpTest.TestTitle: shortstring;
   begin
     Result := 'e^x (single-precision)';
@@ -875,7 +875,7 @@ begin
   Move(SQRT_SPECIAL_INPUTS, FInputs, SizeOf(FInputs)); { Reuse the sqrt inputs }
   Move(EXP_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat32ExpSpecialTest.TestTitle: shortstring;
   begin
     Result := 'e^x (special single-precision)';
@@ -905,7 +905,7 @@ function TFloat32SinTest.DoFunc(Input: Single): Single;
   begin
     Result := Sin(Input);
   end;
-  
+
 function TFloat32SinTest.TestTitle: shortstring;
   begin
     Result := 'sin x (single-precision)';
@@ -931,7 +931,7 @@ const
     NaN,
     -0.0,
     -0.8414709848078965,
-    -0.3499935021712930,    
+    -0.3499935021712930,
     NaN
   );
 
@@ -941,7 +941,7 @@ begin
   Move(SIN_SPECIAL_INPUTS, FInputs, SizeOf(FInputs));
   Move(SIN_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat32SinSpecialTest.TestTitle: shortstring;
   begin
     Result := 'sin x (special single-precision)';
@@ -971,7 +971,7 @@ function TFloat32CosTest.DoFunc(Input: Single): Single;
   begin
     Result := Cos(Input);
   end;
-  
+
 function TFloat32CosTest.TestTitle: shortstring;
   begin
     Result := 'cos x (single-precision)';
@@ -996,7 +996,7 @@ begin
   Move(SIN_SPECIAL_INPUTS, FInputs, SizeOf(FInputs));
   Move(COS_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat32CosSpecialTest.TestTitle: shortstring;
   begin
     Result := 'cos x (special single-precision)';
@@ -1094,7 +1094,7 @@ class function TFloat64Test.IsEqual(Value, Reference: Double): Boolean;
     else
       Epsilon := Power(2, Floor(Ln(Reference) / Ln(2)) - 18);
 
-    Result := Abs(Value - Reference) <= Epsilon;     
+    Result := Abs(Value - Reference) <= Epsilon;
   end;
 
 function TFloat64Test.WriteResults: Boolean;
@@ -1159,7 +1159,7 @@ const
     0.0,
     -1E-4
   );
-  
+
   MAX_64_EXPECTED: array[0..7] of Double = (
     0.5,
     1048577.0,
@@ -1170,7 +1170,7 @@ const
     1E-4,
     0.0
   );
-  
+
 constructor TFloat64MinTest.Create;
 begin
   inherited Create;
@@ -1182,7 +1182,7 @@ function TFloat64MinTest.DoFunc(Input1, Input2: Double): Double;
   begin
     Result := Min(Input1, Input2);
   end;
-  
+
 function TFloat64MinTest.TestTitle: shortstring;
   begin
     Result := 'Min (double-precision)';
@@ -1195,7 +1195,7 @@ function TFloat64ImplicitMinTest.DoFunc(Input1, Input2: Double): Double;
     else
       Result := Input2;
   end;
-  
+
 function TFloat64ImplicitMinTest.TestTitle: shortstring;
   begin
     Result := 'Implicit Min (double-precision)';
@@ -1214,7 +1214,7 @@ function TFloat64MaxTest.DoFunc(Input1, Input2: Double): Double;
   begin
     Result := Max(Input1, Input2);
   end;
-  
+
 function TFloat64MaxTest.TestTitle: shortstring;
   begin
     Result := 'Max (double-precision)';
@@ -1227,7 +1227,7 @@ function TFloat64ImplicitMaxTest.DoFunc(Input1, Input2: Double): Double;
     else
       Result := Input2;
   end;
-  
+
 function TFloat64ImplicitMaxTest.TestTitle: shortstring;
   begin
     Result := 'Implicit Max (double-precision)';
@@ -1245,7 +1245,7 @@ const
     (Infinity, NegInfinity),
     (NegInfinity, Infinity)
   );
-  
+
   MIN_64_SPECIAL_EXPECTED: array[0..7] of Double = (
     0.0,
     NaN,
@@ -1256,7 +1256,7 @@ const
     NegInfinity,
     NegInfinity
   );
-  
+
   MAX_64_SPECIAL_EXPECTED: array[0..7] of Double = (
     0.0,
     NaN,
@@ -1267,14 +1267,14 @@ const
     Infinity,
     Infinity
   );
-  
+
 constructor TFloat64MinSpecialTest.Create;
 begin
   inherited Create;
   Move(MINMAX_64_SPECIAL_INPUTS, FInputs, SizeOf(FInputs));
   Move(MIN_64_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat64MinSpecialTest.TestTitle: shortstring;
   begin
     Result := 'Min (special double-precision)';
@@ -1287,7 +1287,7 @@ function TFloat64ImplicitMinSpecialTest.DoFunc(Input1, Input2: Double): Double;
     else
       Result := Input2;
   end;
-  
+
 function TFloat64ImplicitMinSpecialTest.TestTitle: shortstring;
   begin
     Result := 'Implicit Min (special double-precision)';
@@ -1301,7 +1301,7 @@ begin
   Move(MINMAX_64_SPECIAL_INPUTS, FInputs, SizeOf(FInputs));
   Move(MAX_64_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat64MaxSpecialTest.TestTitle: shortstring;
   begin
     Result := 'Max (special double-precision)';
@@ -1314,7 +1314,7 @@ function TFloat64ImplicitMaxSpecialTest.DoFunc(Input1, Input2: Double): Double;
     else
       Result := Input2;
   end;
-  
+
 function TFloat64ImplicitMaxSpecialTest.TestTitle: shortstring;
   begin
     Result := 'Implicit Max (special double-precision)';
@@ -1332,7 +1332,7 @@ const
     3.1415926535897932384626433832795, { Pi }
     1.5707963267948966192313216916398 { Pi / 2 }
   );
-  
+
   SQRT_64_EXPECTED: array[0..7] of Double = (
     2.0,
     1.0,
@@ -1355,7 +1355,7 @@ function TFloat64SqrtTest.DoFunc(Input: Double): Double;
   begin
     Result := Sqrt(Input);
   end;
-  
+
 function TFloat64SqrtTest.TestTitle: shortstring;
   begin
     Result := 'sqrt(x) (double-precision)';
@@ -1373,7 +1373,7 @@ const
     1E6,
     NaN
   );
-  
+
   SQRT_64_SPECIAL_EXPECTED: array[0..7] of Double = (
     0.0,
     Infinity,
@@ -1391,7 +1391,7 @@ begin
   Move(SQRT_64_SPECIAL_INPUTS, FInputs, SizeOf(FInputs));
   Move(SQRT_64_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat64SqrtSpecialTest.TestTitle: shortstring;
   begin
     Result := 'sqrt(x) (special double-precision)';
@@ -1399,7 +1399,7 @@ function TFloat64SqrtSpecialTest.TestTitle: shortstring;
 
 { TFloat64LnTest }
 
-const  
+const
   LN_64_EXPECTED: array[0..7] of Double = (
     1.3862943611198906188344642429164,
     0.0,
@@ -1407,7 +1407,7 @@ const
     0.69314718055994530941723212145818,
     4.6051701859880913680359829093687,
     -0.69314718055994530941723212145818,
-    1.1447298858494001741434273513531,  
+    1.1447298858494001741434273513531,
     0.45158270528945486472619522989488
   );
 
@@ -1422,7 +1422,7 @@ function TFloat64LnTest.DoFunc(Input: Double): Double;
   begin
     Result := Ln(Input);
   end;
-  
+
 function TFloat64LnTest.TestTitle: shortstring;
   begin
     Result := 'ln x (double-precision)';
@@ -1448,7 +1448,7 @@ begin
   Move(SQRT_64_SPECIAL_INPUTS, FInputs, SizeOf(FInputs)); { Reuse the sqrt inputs }
   Move(LN_64_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat64LnSpecialTest.TestTitle: shortstring;
   begin
     Result := 'ln x (special double-precision)';
@@ -1457,12 +1457,12 @@ function TFloat64LnSpecialTest.TestTitle: shortstring;
 { TFloat64ExpTest }
 const
   EXP_64_EXPECTED: array[0..7] of Double = (
-    54.598150033144239078110261202861,  
+    54.598150033144239078110261202861,
     2.7182818284590455, // remove the last 5 and append 2353602874713527 (too precise),
     1.5114276650041035425200896657073e+111,
     7.389056098930650227230427460575,
     2.68811714181613544841262555158e+43,
-    1.6487212707001281468486507878142,  
+    1.6487212707001281468486507878142,
     23.140692632779269005729086367949,
     4.8104773809653516554730356667038
   );
@@ -1478,7 +1478,7 @@ function TFloat64ExpTest.DoFunc(Input: Double): Double;
   begin
     Result := Exp(Input);
   end;
-  
+
 function TFloat64ExpTest.TestTitle: shortstring;
   begin
     Result := 'e^x (double-precision)';
@@ -1503,7 +1503,7 @@ begin
   Move(SQRT_64_SPECIAL_INPUTS, FInputs, SizeOf(FInputs)); { Reuse the sqrt inputs }
   Move(EXP_64_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat64ExpSpecialTest.TestTitle: shortstring;
   begin
     Result := 'e^x (special double-precision)';
@@ -1533,7 +1533,7 @@ function TFloat64SinTest.DoFunc(Input: Double): Double;
   begin
     Result := Sin(Input);
   end;
-  
+
 function TFloat64SinTest.TestTitle: shortstring;
   begin
     Result := 'sin x (single-precision)';
@@ -1559,7 +1559,7 @@ const
     NaN,
     -0.0,
     -0.8414709848078965066525023216303,
-    -0.34999350217129295211765248678077,    
+    -0.34999350217129295211765248678077,
     NaN
   );
 
@@ -1569,7 +1569,7 @@ begin
   Move(SIN_64_SPECIAL_INPUTS, FInputs, SizeOf(FInputs));
   Move(SIN_64_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat64SinSpecialTest.TestTitle: shortstring;
   begin
     Result := 'sin x (double single-precision)';
@@ -1599,7 +1599,7 @@ function TFloat64CosTest.DoFunc(Input: Double): Double;
   begin
     Result := Cos(Input);
   end;
-  
+
 function TFloat64CosTest.TestTitle: shortstring;
   begin
     Result := 'cos x (double-precision)';
@@ -1624,7 +1624,7 @@ begin
   Move(SIN_64_SPECIAL_INPUTS, FInputs, SizeOf(FInputs));
   Move(COS_64_SPECIAL_EXPECTED, FExpected, SizeOf(FExpected));
 end;
-  
+
 function TFloat64CosSpecialTest.TestTitle: shortstring;
   begin
     Result := 'cos x (special double-precision)';

+ 1 - 1
tests/bench/bval.pp

@@ -18,7 +18,7 @@ begin
       vals[i]:=signs[random(2)+1]+basepref[baseindex];
       for j:=1 to len do
         vals[i]:=vals[i]+chars[random(base)+1];
-    end; 
+    end;
   for i:=1 to 100000 do
     for j:=low(vals) to high(vals) do
       begin

+ 1 - 1
tests/bench/shootout/obsolete/random.pp

@@ -10,7 +10,7 @@ const IM = 139968;
 
 var  LAST, NUM, i: longint;
      value: double;
-     
+
 function gen_random(const n: integer): double; inline;
 begin
   LAST := (LAST * IA + IC) mod IM;

+ 2 - 2
tests/bench/shootout/src/mandelbrot.pp

@@ -3,7 +3,7 @@
 
   contributed by Ales Katona
   modified by Vincent Snijders
-  
+
   additional compiler options:
   i386: -Cfsse2
   x86_64: none
@@ -14,7 +14,7 @@ program mandelbrot;
 var n: longint;
     TextBuf: array[0..$FFF] of byte;
     OutFile: PText;
-    
+
 
 procedure run;
 var

+ 3 - 3
tests/bench/shootout/src/message.pp

@@ -78,13 +78,13 @@ begin
     sem_init(@ReadSem, 0, 0);
     sem_init(@WriteSem, 0, Length(Queue));
   end;
-  
+
   sem_init(FinishedSem, 0, 0);
 
   pthread_attr_init(@ThreadAttr);
   pthread_attr_setdetachstate(@ThreadAttr, 1);
   pthread_attr_setstacksize(@ThreadAttr, 1024 * 16);
-  
+
   ThreadFuncAddr := TStartRoutine(@ThreadFunc);
   pthread_create(@Id, @ThreadAttr, ThreadFuncAddr, Pointer(High(PostOffice)));
 
@@ -92,7 +92,7 @@ begin
     PostMessage(High(PostOffice), 0);
 
   PostMessage(High(PostOffice), -1);
-  
+
   sem_wait(FinishedSem);
   WriteLn(Sum);
 end.

+ 1 - 1
tests/bench/shootout/src/thread_ring.pp

@@ -15,7 +15,7 @@ var
   ThreadFuncAddr: TStartRoutine;
   FinishedSem: TSemaphore;
   Count: Integer;
-  
+
 function ThreadFunc(AIndex: PtrInt): Pointer; cdecl;
 var
   MySem, NextSem: PSemaphore;

+ 2 - 2
tests/bench/shortbench.pp

@@ -117,8 +117,8 @@ begin
       inc(rtot,r[i]);
       Write(r[i]:6);
     end;
-  Write('':4);  
-  Write('avg=',rtot div 8);    
+  Write('':4);
+  Write('avg=',rtot div 8);
   Writeln;
 end;
 

+ 8 - 8
tests/bench/stream.pp

@@ -53,7 +53,7 @@ uses windows;
 { INSTRUCTIONS:
  *
  *	1) Stream requires a good bit of memory to run.  Adjust the
- *          value of 'N' (below) to give a 'timing calibration' of 
+ *          value of 'N' (below) to give a 'timing calibration' of
  *          at least 20 clock-ticks.  This will provide rate estimates
  *          that should be good to about 5% precision.
  }
@@ -310,7 +310,7 @@ var quantum:longint;
     j,k:longint;
     scalar,t:double;
     times:array[0..3,0..NTIMES-1] of double;
-    
+
 begin
     { --- SETUP --- determine precision and check timing --- }
     writeln(HLINE);
@@ -337,9 +337,9 @@ begin
       end;
 
     writeln(HLINE);
-    
+
     quantum:=checktick;
-    if quantum>=1 then 
+    if quantum>=1 then
       writeln('Your clock granularity/precision appears to be ',quantum,
 	          ' microseconds.')
     else
@@ -347,7 +347,7 @@ begin
               'less than one microsecond.');
 
     t:=mysecond;
-    for j:=0 to N-1 do 
+    for j:=0 to N-1 do
 	  a[j]:=2*a[j];
     t:=1E6*(mysecond-t);
 
@@ -363,7 +363,7 @@ begin
     writeln('For best results, please be sure you know the');
     writeln('precision of your system timer.');
     writeln(HLINE);
-    
+
     {	--- MAIN LOOP --- repeat test cases NTIMES times --- }
 
     scalar:=3;
@@ -377,7 +377,7 @@ begin
           c[j]:=a[j];
 {$endif}
         times[0,k]:=mysecond-times[0,k];
-	
+
         times[1,k]:=mysecond;
 {$ifdef TUNED}
         tuned_STREAM_Scale(scalar);
@@ -412,7 +412,7 @@ begin
           mintime[j]:=MIN(mintime[j], times[j,k]);
           maxtime[j]:=MAX(maxtime[j], times[j,k]);
         end;
-    
+
     writeln('Function      Rate (MB/s)   Avg time     Min time     Max time');
     for j:=0 to 3 do
       begin

+ 2 - 2
tests/tbf/tb0210.pp

@@ -1,13 +1,13 @@
 { %fail }
 
-// check whether enums can NOT be casted to object references; this 
+// check whether enums can NOT be casted to object references; this
 // should NOT work in objfpc mode (see also tbs/tb0554.pp)
 {$mode objfpc}
 
 {$packenum 2}
 type
   TEnum = (a, b, c);
-  
+
 var
   e : TEnum;
   o : TObject;

+ 2 - 2
tests/tbf/tb0210a.pp

@@ -1,13 +1,13 @@
 { %fail }
 
-// check whether enums can NOT be casted to object references; this 
+// check whether enums can NOT be casted to object references; this
 // should NOT work in objfpc mode (see also tbs/tb0554.pp)
 {$mode objfpc}
 
 {$packenum 2}
 type
   TEnum = (a, b, c);
-  
+
 var
   e : TEnum;
   o : TObject;

+ 1 - 1
tests/tbf/tb0211.pp

@@ -1,6 +1,6 @@
 { %fail }
 
-// check whether integers can NOT be casted to object references; this 
+// check whether integers can NOT be casted to object references; this
 // should NOT work in objfpc mode (see also tbs/tb0554.pp)
 {$mode objfpc}
 

+ 1 - 1
tests/tbf/tb0211a.pp

@@ -1,6 +1,6 @@
 { %fail }
 
-// check whether integers can NOT be casted to object references; this 
+// check whether integers can NOT be casted to object references; this
 // should NOT work in objfpc mode (see also tbs/tb0554.pp)
 {$mode objfpc}
 

+ 2 - 2
tests/tbf/tb0234.pp

@@ -1,10 +1,10 @@
 { %FAIL }
 
 program tb0234;
- 
+
 uses
   ub0234.ub0234;
- 
+
 var
   c: Integer;
 begin

+ 1 - 1
tests/tbf/tb0246.pp

@@ -8,7 +8,7 @@ type
   TTest = record
   type
     TTestSub = record
-    type 
+    type
       TTestSub2 = record
         f: TTest;
       end;

+ 1 - 1
tests/tbf/tb0274.pp

@@ -1,6 +1,6 @@
 { %fail }
 { %opt=-Sew }
-var 
+var
   c : comp;
 
 begin

+ 1 - 1
tests/tbf/tb0285.pp

@@ -2,7 +2,7 @@
 { %opt=-O4 -Sew }
 
 { This code can generate trouble because
-  uninitialized retrun value in f method 
+  uninitialized retrun value in f method
   can have a pattern that generates a
   floating point exception later.
 

+ 4 - 4
tests/tbf/ub0234.pp

@@ -1,10 +1,10 @@
 unit ub0234;
- 
+
 interface
- 
+
   type
     TEnum = (enumBAR);
- 
+
 implementation
- 
+
 end.

+ 4 - 4
tests/tbf/ub0234.ub0234.pp

@@ -1,10 +1,10 @@
 unit ub0234.ub0234;
- 
+
 interface
- 
+
   uses
     ub0234;
- 
+
 implementation
- 
+
 end.

+ 4 - 4
tests/tbs/ib0690.inc

@@ -5,7 +5,7 @@ const
   ic4 = &121_102;
   ic5 = 1_123_123;
   ic6 = 1_1235_1235;
-  ic7 = $1_123_123;  
+  ic7 = $1_123_123;
   ic8 = $1_12354;
   rc1 = 1_1235_1235;
   rc2 = 1_123_123.000_000;
@@ -13,7 +13,7 @@ const
   rc4 = 1_123_123.000_000e1_2;
   rc5 = 1_1234_1234.0000_0000e1_2;
 var
-  i : Int64;  
+  i : Int64;
   r : Real;
 begin
   i:=%1001_1001;
@@ -22,14 +22,14 @@ begin
   i:=&121_102;
   i:=1_123_123;
   i:=1_1235_1235;
-  i:=$1_123_123;  
+  i:=$1_123_123;
   i:=$1_12354;
   r:=1_1235_1235;
   r:=1_123_123.000_000;
   r:=1_1234_1234.0000_0000;
   r:=1_123_123.000_000e1_2;
   r:=1_1234_1234.0000_0000e1_2;
-  
+
 {$if rc1=1_1235_1235}
   r:=1;
 {$endif r=1_1235_1235}

+ 1 - 1
tests/tbs/tb0193.pp

@@ -61,7 +61,7 @@ end;
   adrp x0,stacksize@PAGE
   ldr  x0,[x0,stacksize@PAGEOFF]
 end;
-{$define implemented}   
+{$define implemented}
 {$endif cpuaarch64}
 {$ifdef cpuriscv64}
 .L1:

+ 1 - 1
tests/tbs/tb0259.pp

@@ -21,7 +21,7 @@ end;
 
 procedure c2.SetFont(l: longint);
 begin
-  inherited font := l;  
+  inherited font := l;
 end;
 
 var

+ 1 - 1
tests/tbs/tb0336.pp

@@ -40,7 +40,7 @@ begin
    val(s,l,code);
    if code<>0 then
      do_error(5);
-     
+
    s:='-2147483649';
    val(s,l,code);
    if code=0 then

+ 1 - 1
tests/tbs/tb0494.pp

@@ -6,7 +6,7 @@ var
 begin
   p1:=nil;
   if (ca-p1)=0 then
-    halt(1); 
+    halt(1);
   p1:=ca;
 end.
    

+ 1 - 1
tests/tbs/tb0508.pp

@@ -11,7 +11,7 @@ begin
   PointerLocal(p)(get_caller_frame(get_frame,get_pc_addr));
 {$else}
 PointerLocal(p)(get_frame);
-{$endif}  
+{$endif}
 
 end;
 

+ 2 - 2
tests/tbs/tb0531.pp

@@ -40,7 +40,7 @@ begin
   l := l + s1;
   if l <> 127 then
     halt(5);
-  
+
   s1 := 126;
   s2 := -128;
   s1 := s1 or s2;
@@ -93,7 +93,7 @@ begin
   l := l + s1;
   if l <> 32767 then
     halt(5+6);
-  
+
   s1 := 32766;
   s2 := -32768;
   s1 := s1 or s2;

+ 1 - 1
tests/tbs/tb0536.pp

@@ -11,5 +11,5 @@ begin
   v := dt;
   s := v;
   // It should return the date, depending on the localisation settings
-  if s = '40000' then halt(1); 
+  if s = '40000' then halt(1);
 end.

+ 1 - 1
tests/tbs/tb0547.pp

@@ -16,6 +16,6 @@ ttestclass = class
   fcolor: colorty;
  published
   property color: colorty read fcolor write fcolor default cl_mapped; //<<--
-end; 
+end;
 begin
 end.

+ 2 - 2
tests/tbs/tb0554.pp

@@ -1,10 +1,10 @@
-// check whether enums and integers can be casted to object references; this 
+// check whether enums and integers can be casted to object references; this
 // should work in Delphi mode (is Delphi compatible)
 {$mode delphi}
 {$packenum 2}
 type
   TEnum = (a, b, c);
-  
+
 var
   i : Word;
   e : TEnum;

+ 2 - 2
tests/tbs/tb0587.pp

@@ -24,6 +24,6 @@ end;
 begin
   test
 end.
-    
-  
+
+
 

+ 1 - 1
tests/tbs/tb0592.pp

@@ -1,5 +1,5 @@
 {$mode objfpc}
-type 
+type
   TT_Stream   = record z : Pointer; end;
 
   TFreeTypeStream = class

+ 1 - 1
tests/tbs/tb0593.pp

@@ -41,7 +41,7 @@ function TopBlockType(const Stack: TBlockStack): TBlockType;
       Result:=Stack.Stack[Stack.Top].Typ
     else
       Result:=btNone;
-  end;  
+  end;
 
 begin
 end.

+ 1 - 1
tests/tbs/tb0597.pp

@@ -12,7 +12,7 @@ end;
 
 begin
    test;
-   
+
    if x <> $12345678 then
       halt(1);
 end.

+ 1 - 1
tests/tbs/tb0609.pp

@@ -32,7 +32,7 @@ var
   s: string;
 begin
   pointer(s):=nil;
-end;  
+end;
 
 
 begin

+ 1 - 1
tests/tbs/tb0621.pp

@@ -40,4 +40,4 @@ if x2<>1 then
 {$endif FPC_COMP_IS_INT64}
 
 
-END. 
+END.

+ 2 - 2
tests/tbs/tb0631.pp

@@ -14,8 +14,8 @@ type
   end;
 
 begin
-  if PInterfaceData(TypInfo.GetTypeData(TypeInfo(IFoo)))^.PropertyTable^.Prop[0]^.PropType 
-    <> TypeInfo(Pointer) 
+  if PInterfaceData(TypInfo.GetTypeData(TypeInfo(IFoo)))^.PropertyTable^.Prop[0]^.PropType
+    <> TypeInfo(Pointer)
   then
     halt(1);
   WriteLn('ok');

+ 1 - 1
tests/tbs/tb0660.pp

@@ -4,7 +4,7 @@ function f : longint;inline;
   begin
     result:=result*result;
   end;
-  
+
 begin
   writeln(f);
 end.

+ 1 - 1
tests/tbs/tb0664.pp

@@ -404,7 +404,7 @@ begin
   Result := nil;
   SetLength(Result, FCount);
   for i := 0 to FCount - 1 do Result[i] := T(FData[i]);
-    
+
 end;
 
 { ListHelper }

+ 5 - 5
tests/tbs/tb0679.pp

@@ -7,19 +7,19 @@ program tb0679;
 type
   TA = class
   public
-    class destructor Destroy; 
+    class destructor Destroy;
     destructor Destroy; override;
   end;
-  
-class destructor TA.Destroy; 
+
+class destructor TA.Destroy;
 begin
 end;
-    
+
 destructor TA.Destroy;
 begin
   inherited;
 end;
- 
+
 var
   A: TA;
 begin

+ 2 - 2
tests/tbs/tb0682.pp

@@ -7,11 +7,11 @@ label
 
 begin
   asm
-    movl l@GOT(%eax),%eax 
+    movl l@GOT(%eax),%eax
     l:
   end;
   asm
-    movl .Ll@GOT(%eax),%eax 
+    movl .Ll@GOT(%eax),%eax
     .Ll:
   end;
 end.

+ 4 - 4
tests/tbs/tb0693a.pp

@@ -10,21 +10,21 @@ type
     lThree,
     lFour
   );
- 
+
 const
   LANGUAGE_NONE = TLanguages(255);
- 
+
 type
  TLanguage = record
    Index : TLanguages;
  end;
- 
+
 var
   Lang: TLanguages;
   CurrentLanguage: TLanguage = (
     Index:  LANGUAGE_NONE
   );
- 
+
 begin
   Lang := LANGUAGE_NONE;
 end.

+ 4 - 4
tests/tbs/tb0693b.pp

@@ -12,21 +12,21 @@ type
   );
 
   TLanguagesSub = lOne..lTwo;
- 
+
 const
   LANGUAGE_NONE = TLanguages(255);
- 
+
 type
  TLanguage = record
    Index : TLanguagesSub;
  end;
- 
+
 var
   Lang: TLanguages;
   CurrentLanguage: TLanguage = (
     Index:  LANGUAGE_NONE
   );
- 
+
 begin
   Lang := LANGUAGE_NONE;
 end.

+ 2 - 2
tests/test/alglib/t_testconvunit.pp

@@ -6,13 +6,13 @@ uses Sysutils, u_testconvunit;
 
 begin
     Randomize();
-    try 
+    try
         if not testconvunit_test_silent() then
         begin
             //WriteLn('*');
             Halt(1);
         end;
-    except on E: Exception do 
+    except on E: Exception do
         begin
             Halt(2);
         end;

+ 2 - 2
tests/test/alglib/t_testcorrunit.pp

@@ -6,13 +6,13 @@ uses Sysutils, u_testcorrunit;
 
 begin
     Randomize();
-    try 
+    try
         if not testcorrunit_test_silent() then
         begin
             //WriteLn('*');
             Halt(1);
         end;
-    except on E: Exception do 
+    except on E: Exception do
         begin
             Halt(2);
         end;

+ 2 - 2
tests/test/alglib/t_testfftunit.pp

@@ -6,13 +6,13 @@ uses Sysutils, u_testfftunit;
 
 begin
     Randomize();
-    try 
+    try
         if not testfftunit_test_silent() then
         begin
             //WriteLn('*');
             Halt(1);
         end;
-    except on E: Exception do 
+    except on E: Exception do
         begin
             Halt(2);
         end;

+ 2 - 2
tests/test/alglib/t_testfhtunit.pp

@@ -6,13 +6,13 @@ uses Sysutils, u_testfhtunit;
 
 begin
     Randomize();
-    try 
+    try
         if not testfhtunit_test_silent() then
         begin
             //WriteLn('*');
             Halt(1);
         end;
-    except on E: Exception do 
+    except on E: Exception do
         begin
             Halt(2);
         end;

+ 54 - 54
tests/test/alglib/u_conv.pp

@@ -4,7 +4,7 @@ Copyright (c) 2009, Sergey Bochkanov (ALGLIB project).
 >>> SOURCE LICENSE >>>
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation (www.fsf.org); either version 2 of the 
+the Free Software Foundation (www.fsf.org); either version 2 of the
 License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
@@ -116,7 +116,7 @@ procedure ConvC1D(const A : TComplex1DArray;
      var R : TComplex1DArray);
 begin
     Assert((N>0) and (M>0), 'ConvC1D: incorrect N or M!');
-    
+
     //
     // normalize task: make M>=N,
     // so A will be longer that B.
@@ -274,7 +274,7 @@ var
     i1_ : Integer;
 begin
     Assert((N>0) and (M>0), 'ConvC1DCircular: incorrect N or M!');
-    
+
     //
     // normalize task: make M>=N,
     // so A will be longer (at least - not shorter) that B.
@@ -356,7 +356,7 @@ var
     i1_ : Integer;
 begin
     Assert((N>0) and (M>0), 'ConvC1DCircularInv: incorrect N or M!');
-    
+
     //
     // normalize task: make M>=N,
     // so A will be longer (at least - not shorter) that B.
@@ -385,7 +385,7 @@ begin
         ConvC1DCircularInv(A, M, CBuf, M, R);
         Exit;
     end;
-    
+
     //
     // Task is normalized
     //
@@ -479,7 +479,7 @@ var
     Flop2 : Double;
 begin
     Assert((N>0) and (M>0), 'ConvR1D: incorrect N or M!');
-    
+
     //
     // normalize task: make M>=N,
     // so A will be longer that B.
@@ -612,7 +612,7 @@ var
     J2 : Integer;
 begin
     Assert((N>0) and (M>0), 'ConvC1DCircular: incorrect N or M!');
-    
+
     //
     // normalize task: make M>=N,
     // so A will be longer (at least - not shorter) that B.
@@ -637,7 +637,7 @@ begin
         ConvR1DCircular(S, M, Buf, M, C);
         Exit;
     end;
-    
+
     //
     // reduce to usual convolution
     //
@@ -693,7 +693,7 @@ var
     T : Double;
 begin
     Assert((N>0) and (M>0), 'ConvR1DCircularInv: incorrect N or M!');
-    
+
     //
     // normalize task: make M>=N,
     // so A will be longer (at least - not shorter) that B.
@@ -718,13 +718,13 @@ begin
         ConvR1DCircularInv(A, M, Buf, M, R);
         Exit;
     end;
-    
+
     //
     // Task is normalized
     //
     if M mod 2=0 then
     begin
-        
+
         //
         // size is even, use fast even-size FFT
         //
@@ -762,7 +762,7 @@ begin
     end
     else
     begin
-        
+
         //
         // odd-size, use general real FFT
         //
@@ -849,13 +849,13 @@ var
 begin
     Assert((N>0) and (M>0), 'ConvC1DX: incorrect N or M!');
     Assert(N<=M, 'ConvC1DX: N<M assumption is false!');
-    
+
     //
     // Auto-select
     //
     if (Alg=-1) or (Alg=-2) then
     begin
-        
+
         //
         // Initial candidate: straightforward implementation.
         //
@@ -872,7 +872,7 @@ begin
         begin
             FlopBest := MaxRealNumber;
         end;
-        
+
         //
         // Another candidate - generic FFT code
         //
@@ -880,7 +880,7 @@ begin
         begin
             if Circular and FTBaseIsSmooth(M) then
             begin
-                
+
                 //
                 // special code for circular convolution of a sequence with a smooth length
                 //
@@ -893,7 +893,7 @@ begin
             end
             else
             begin
-                
+
                 //
                 // general cyclic/non-cyclic convolution
                 //
@@ -906,7 +906,7 @@ begin
                 end;
             end;
         end;
-        
+
         //
         // Another candidate - overlap-add
         //
@@ -932,7 +932,7 @@ begin
         ConvC1DX(A, M, B, N, Circular, Alg, Q, R);
         Exit;
     end;
-    
+
     //
     // straightforward formula for
     // circular and non-circular convolutions.
@@ -941,7 +941,7 @@ begin
     //
     if Alg=0 then
     begin
-        
+
         //
         // Special case: N=1
         //
@@ -955,13 +955,13 @@ begin
             end;
             Exit;
         end;
-        
+
         //
         // use straightforward formula
         //
         if Circular then
         begin
-            
+
             //
             // circular convolution
             //
@@ -998,7 +998,7 @@ begin
         end
         else
         begin
-            
+
             //
             // non-circular convolution
             //
@@ -1023,7 +1023,7 @@ begin
         end;
         Exit;
     end;
-    
+
     //
     // general FFT-based code for
     // circular and non-circular convolutions.
@@ -1038,7 +1038,7 @@ begin
     begin
         if Circular and FTBaseIsSmooth(M) then
         begin
-            
+
             //
             // special code for circular convolution with smooth M
             //
@@ -1094,7 +1094,7 @@ begin
         end
         else
         begin
-            
+
             //
             // M is non-smooth, general code (circular/non-circular):
             // * first part is the same for circular and non-circular
@@ -1154,7 +1154,7 @@ begin
             T := AP_Double(1)/P;
             if Circular then
             begin
-                
+
                 //
                 // circular, add tail to head
                 //
@@ -1176,7 +1176,7 @@ begin
             end
             else
             begin
-                
+
                 //
                 // non-circular, just copy
                 //
@@ -1192,7 +1192,7 @@ begin
         end;
         Exit;
     end;
-    
+
     //
     // overlap-add method for
     // circular and non-circular convolutions.
@@ -1206,7 +1206,7 @@ begin
     if Alg=2 then
     begin
         SetLength(Buf, 2*(Q+N-1));
-        
+
         //
         // prepare R
         //
@@ -1230,7 +1230,7 @@ begin
                 Inc(I);
             end;
         end;
-        
+
         //
         // pre-calculated FFT(B)
         //
@@ -1246,12 +1246,12 @@ begin
             Inc(J);
         end;
         FFTC1D(BBuf, Q+N-1);
-        
+
         //
         // prepare FFT plan for chunks of A
         //
         FTBaseGenerateComplexFFTPlan(Q+N-1, Plan);
-        
+
         //
         // main overlap-add cycle
         //
@@ -1380,7 +1380,7 @@ var
 begin
     Assert((N>0) and (M>0), 'ConvC1DX: incorrect N or M!');
     Assert(N<=M, 'ConvC1DX: N<M assumption is false!');
-    
+
     //
     // handle special cases
     //
@@ -1388,13 +1388,13 @@ begin
     begin
         Alg := 0;
     end;
-    
+
     //
     // Auto-select
     //
     if Alg<0 then
     begin
-        
+
         //
         // Initial candidate: straightforward implementation.
         //
@@ -1411,7 +1411,7 @@ begin
         begin
             FlopBest := MaxRealNumber;
         end;
-        
+
         //
         // Another candidate - generic FFT code
         //
@@ -1419,7 +1419,7 @@ begin
         begin
             if Circular and FTBaseIsSmooth(M) and (M mod 2=0) then
             begin
-                
+
                 //
                 // special code for circular convolution of a sequence with a smooth length
                 //
@@ -1432,7 +1432,7 @@ begin
             end
             else
             begin
-                
+
                 //
                 // general cyclic/non-cyclic convolution
                 //
@@ -1445,7 +1445,7 @@ begin
                 end;
             end;
         end;
-        
+
         //
         // Another candidate - overlap-add
         //
@@ -1471,7 +1471,7 @@ begin
         ConvR1DX(A, M, B, N, Circular, Alg, Q, R);
         Exit;
     end;
-    
+
     //
     // straightforward formula for
     // circular and non-circular convolutions.
@@ -1480,7 +1480,7 @@ begin
     //
     if Alg=0 then
     begin
-        
+
         //
         // Special case: N=1
         //
@@ -1491,13 +1491,13 @@ begin
             APVMove(@R[0], 0, M-1, @A[0], 0, M-1, V);
             Exit;
         end;
-        
+
         //
         // use straightforward formula
         //
         if Circular then
         begin
-            
+
             //
             // circular convolution
             //
@@ -1523,7 +1523,7 @@ begin
         end
         else
         begin
-            
+
             //
             // non-circular convolution
             //
@@ -1544,7 +1544,7 @@ begin
         end;
         Exit;
     end;
-    
+
     //
     // general FFT-based code for
     // circular and non-circular convolutions.
@@ -1562,7 +1562,7 @@ begin
         Assert(M+N-1>2, 'ConvR1DX: internal error!');
         if Circular and FTBaseIsSmooth(M) and (M mod 2=0) then
         begin
-            
+
             //
             // special code for circular convolution with smooth even M
             //
@@ -1601,7 +1601,7 @@ begin
         end
         else
         begin
-            
+
             //
             // M is non-smooth or non-even, general code (circular/non-circular):
             // * first part is the same for circular and non-circular
@@ -1649,7 +1649,7 @@ begin
             FFTR1DInvInternalEven(Buf, P, Buf3, Plan);
             if Circular then
             begin
-                
+
                 //
                 // circular, add tail to head
                 //
@@ -1662,7 +1662,7 @@ begin
             end
             else
             begin
-                
+
                 //
                 // non-circular, just copy
                 //
@@ -1672,7 +1672,7 @@ begin
         end;
         Exit;
     end;
-    
+
     //
     // overlap-add method
     //
@@ -1683,7 +1683,7 @@ begin
         SetLength(Buf2, Q+N-1);
         SetLength(Buf3, Q+N-1);
         FTBaseGenerateComplexFFTPlan((Q+N-1) div 2, Plan);
-        
+
         //
         // prepare R
         //
@@ -1707,7 +1707,7 @@ begin
                 Inc(I);
             end;
         end;
-        
+
         //
         // pre-calculated FFT(B)
         //
@@ -1719,7 +1719,7 @@ begin
             Inc(J);
         end;
         FFTR1DInternalEven(Buf2, Q+N-1, Buf3, Plan);
-        
+
         //
         // main overlap-add cycle
         //

+ 5 - 5
tests/test/alglib/u_corr.pp

@@ -4,7 +4,7 @@ Copyright (c) 2009, Sergey Bochkanov (ALGLIB project).
 >>> SOURCE LICENSE >>>
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation (www.fsf.org); either version 2 of the 
+the Free Software Foundation (www.fsf.org); either version 2 of the
 License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
@@ -161,7 +161,7 @@ var
     i1_ : Integer;
 begin
     Assert((N>0) and (M>0), 'ConvC1DCircular: incorrect N or M!');
-    
+
     //
     // normalize task: make M>=N,
     // so A will be longer (at least - not shorter) that B.
@@ -190,7 +190,7 @@ begin
         CorrC1DCircular(Signal, M, B, M, C);
         Exit;
     end;
-    
+
     //
     // Task is normalized
     //
@@ -324,7 +324,7 @@ var
     J2 : Integer;
 begin
     Assert((N>0) and (M>0), 'ConvC1DCircular: incorrect N or M!');
-    
+
     //
     // normalize task: make M>=N,
     // so A will be longer (at least - not shorter) that B.
@@ -349,7 +349,7 @@ begin
         CorrR1DCircular(Signal, M, B, M, C);
         Exit;
     end;
-    
+
     //
     // Task is normalized
     //

+ 17 - 17
tests/test/alglib/u_fft.pp

@@ -4,7 +4,7 @@ Copyright (c) 2009, Sergey Bochkanov (ALGLIB project).
 >>> SOURCE LICENSE >>>
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation (www.fsf.org); either version 2 of the 
+the Free Software Foundation (www.fsf.org); either version 2 of the
 License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
@@ -58,7 +58,7 @@ Algorithm has O(N*logN) complexity for any N (composite or prime).
 INPUT PARAMETERS
     A   -   array[0..N-1] - complex function to be transformed
     N   -   problem size
-    
+
 OUTPUT PARAMETERS
     A   -   DFT of a input array, array[0..N-1]
             A_out[j] = SUM(A_in[k]*exp(-2*pi*sqrt(-1)*j*k/N), k = 0..N-1)
@@ -74,7 +74,7 @@ var
     Buf : TReal1DArray;
 begin
     Assert(N>0, 'FFTC1D: incorrect N!');
-    
+
     //
     // Special case: N=1, FFT is just identity transform.
     // After this block we assume that N is strictly greater than 1.
@@ -83,7 +83,7 @@ begin
     begin
         Exit;
     end;
-    
+
     //
     // convert input array to the more convinient format
     //
@@ -95,7 +95,7 @@ begin
         Buf[2*I+1] := A[I].Y;
         Inc(I);
     end;
-    
+
     //
     // Generate plan and execute it.
     //
@@ -105,7 +105,7 @@ begin
     //
     FTBaseGenerateComplexFFTPlan(N, Plan);
     FTBaseExecutePlan(Buf, 0, N, Plan);
-    
+
     //
     // result
     //
@@ -144,7 +144,7 @@ var
     I : Integer;
 begin
     Assert(N>0, 'FFTC1DInv: incorrect N!');
-    
+
     //
     // Inverse DFT can be expressed in terms of the DFT as
     //
@@ -204,7 +204,7 @@ var
     Plan : FTPlan;
 begin
     Assert(N>0, 'FFTR1D: incorrect N!');
-    
+
     //
     // Special cases:
     // * N=1, FFT is just identity transform.
@@ -227,13 +227,13 @@ begin
         F[1].Y := 0;
         Exit;
     end;
-    
+
     //
     // Choose between odd-size and even-size FFTs
     //
     if N mod 2=0 then
     begin
-        
+
         //
         // even-size real FFT, use reduction to the complex task
         //
@@ -269,7 +269,7 @@ begin
     end
     else
     begin
-        
+
         //
         // use complex FFT
         //
@@ -323,7 +323,7 @@ var
     FH : TComplex1DArray;
 begin
     Assert(N>0, 'FFTR1DInv: incorrect N!');
-    
+
     //
     // Special case: N=1, FFT is just identity transform.
     // After this block we assume that N is strictly greater than 1.
@@ -334,7 +334,7 @@ begin
         A[0] := F[0].X;
         Exit;
     end;
-    
+
     //
     // inverse real FFT is reduced to the inverse real FHT,
     // which is reduced to the forward real FHT,
@@ -393,7 +393,7 @@ var
     V : Complex;
 begin
     Assert((N>0) and (N mod 2=0), 'FFTR1DEvenInplace: incorrect N!');
-    
+
     //
     // Special cases:
     // * N=2
@@ -408,7 +408,7 @@ begin
         A[1] := Y;
         Exit;
     end;
-    
+
     //
     // even-size real FFT, use reduction to the complex task
     //
@@ -455,7 +455,7 @@ var
     N2 : Integer;
 begin
     Assert((N>0) and (N mod 2=0), 'FFTR1DInvInternalEven: incorrect N!');
-    
+
     //
     // Special cases:
     // * N=2
@@ -470,7 +470,7 @@ begin
         A[1] := Y;
         Exit;
     end;
-    
+
     //
     // inverse real FFT is reduced to the inverse real FHT,
     // which is reduced to the forward real FHT,

+ 6 - 6
tests/test/alglib/u_fht.pp

@@ -4,7 +4,7 @@ Copyright (c) 2009, Sergey Bochkanov (ALGLIB project).
 >>> SOURCE LICENSE >>>
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation (www.fsf.org); either version 2 of the 
+the Free Software Foundation (www.fsf.org); either version 2 of the
 License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
@@ -34,7 +34,7 @@ Algorithm has O(N*logN) complexity for any N (composite or prime).
 INPUT PARAMETERS
     A   -   array[0..N-1] - real function to be transformed
     N   -   problem size
-    
+
 OUTPUT PARAMETERS
     A   -   FHT of a input array, array[0..N-1],
             A_out[k] = sum(A_in[j]*(cos(2*pi*j*k/N)+sin(2*pi*j*k/N)), j=0..N-1)
@@ -50,7 +50,7 @@ var
     FA : TComplex1DArray;
 begin
     Assert(N>0, 'FHTR1D: incorrect N!');
-    
+
     //
     // Special case: N=1, FHT is just identity transform.
     // After this block we assume that N is strictly greater than 1.
@@ -59,7 +59,7 @@ begin
     begin
         Exit;
     end;
-    
+
     //
     // Reduce FHt to real FFT
     //
@@ -94,7 +94,7 @@ var
     I : Integer;
 begin
     Assert(N>0, 'FHTR1DInv: incorrect N!');
-    
+
     //
     // Special case: N=1, iFHT is just identity transform.
     // After this block we assume that N is strictly greater than 1.
@@ -103,7 +103,7 @@ begin
     begin
         Exit;
     end;
-    
+
     //
     // Inverse FHT can be expressed in terms of the FHT as
     //

+ 29 - 29
tests/test/alglib/u_ftbase.pp

@@ -4,7 +4,7 @@ Copyright (c) 2009, Sergey Bochkanov (ALGLIB project).
 >>> SOURCE LICENSE >>>
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation (www.fsf.org); either version 2 of the 
+the Free Software Foundation (www.fsf.org); either version 2 of the
 License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
@@ -132,7 +132,7 @@ entries.
 
 Subroutine parameters:
     N               task size
-    
+
 Output parameters:
     Plan            plan
 
@@ -347,7 +347,7 @@ begin
     end;
     if Plan.Plan[EntryOffset+3]=FFTCooleyTukeyPlan then
     begin
-        
+
         //
         // Cooley-Tukey plan
         // * transposition
@@ -381,7 +381,7 @@ begin
     end;
     if Plan.Plan[EntryOffset+3]=FFTRealCooleyTukeyPlan then
     begin
-        
+
         //
         // Cooley-Tukey plan
         // * transposition
@@ -399,7 +399,7 @@ begin
         I:=0;
         while I<=N1 div 2-1 do
         begin
-            
+
             //
             // pack two adjacent smaller real FFT's together,
             // make one complex FFT,
@@ -452,7 +452,7 @@ begin
     end;
     if Plan.Plan[EntryOffset+3]=FHTCooleyTukeyPlan then
     begin
-        
+
         //
         // Cooley-Tukey FHT plan:
         // * transpose                    \
@@ -545,7 +545,7 @@ begin
     end;
     if Plan.Plan[EntryOffset+3]=FHTN2Plan then
     begin
-        
+
         //
         // Cooley-Tukey FHT plan
         //
@@ -766,7 +766,7 @@ begin
     end;
     if Plan.Plan[EntryOffset+3]=FFTBluesteinPlan then
     begin
-        
+
         //
         // Bluestein plan:
         // 1. multiply by precomputed coefficients
@@ -865,7 +865,7 @@ var
 begin
     N1 := 0;
     N2 := 0;
-    
+
     //
     // try to find good codelet
     //
@@ -883,7 +883,7 @@ begin
             Dec(J);
         end;
     end;
-    
+
     //
     // try to factorize N
     //
@@ -901,7 +901,7 @@ begin
             Inc(J);
         end;
     end;
-    
+
     //
     // looks like N is prime :(
     //
@@ -910,7 +910,7 @@ begin
         N1 := 1;
         N2 := N;
     end;
-    
+
     //
     // normalize
     //
@@ -1044,7 +1044,7 @@ var
     ESize : Integer;
     EntryOffset : Integer;
 begin
-    
+
     //
     // prepare
     //
@@ -1055,7 +1055,7 @@ begin
     EntryOffset := PlanSize;
     ESize := FTBasePlanEntrySize;
     PlanSize := PlanSize+ESize;
-    
+
     //
     // if N=1, generate empty plan and exit
     //
@@ -1071,20 +1071,20 @@ begin
         Plan.Plan[EntryOffset+7] := -1;
         Exit;
     end;
-    
+
     //
     // generate plans
     //
     FTBaseFactorize(N, TaskType, N1, N2);
     if (TaskType=FTBaseCFFTTask) or (TaskType=FTBaseRFFTTask) then
     begin
-        
+
         //
         // complex FFT plans
         //
         if N1<>1 then
         begin
-            
+
             //
             // Cooley-Tukey plan (real or complex)
             //
@@ -1115,7 +1115,7 @@ begin
         begin
             if (N=2) or (N=3) or (N=4) or (N=5) then
             begin
-                
+
                 //
                 // hard-coded plan
                 //
@@ -1139,7 +1139,7 @@ begin
             end
             else
             begin
-                
+
                 //
                 // Bluestein's plan
                 //
@@ -1168,13 +1168,13 @@ begin
     end;
     if TaskType=FTBaseRFHTTask then
     begin
-        
+
         //
         // real FHT plans
         //
         if N1<>1 then
         begin
-            
+
             //
             // Cooley-Tukey plan
             //
@@ -1194,7 +1194,7 @@ begin
         end
         else
         begin
-            
+
             //
             // N2 plan
             //
@@ -1208,7 +1208,7 @@ begin
             Plan.Plan[EntryOffset+7] := -1;
             if (N=2) or (N=3) or (N=4) or (N=5) then
             begin
-                
+
                 //
                 // hard-coded plan
                 //
@@ -1373,7 +1373,7 @@ begin
             TmpY := X*TwY+Y*TwXM1;
             A[Offs+0] := X+TmpX;
             A[Offs+1] := Y+TmpY;
-            
+
             //
             // update Tw: Tw(new) = Tw(old)*TwRow
             //
@@ -1395,7 +1395,7 @@ begin
             end;
             Inc(J);
         end;
-        
+
         //
         // update TwRow: TwRow(new) = TwRow(old)*TwBase
         //
@@ -1511,7 +1511,7 @@ begin
     end;
     if N>M then
     begin
-        
+
         //
         // New partition:
         //
@@ -1529,7 +1529,7 @@ begin
     end
     else
     begin
-        
+
         //
         // New partition:
         //
@@ -1596,7 +1596,7 @@ begin
     end;
     if N>M then
     begin
-        
+
         //
         // New partition:
         //
@@ -1614,7 +1614,7 @@ begin
     end
     else
     begin
-        
+
         //
         // New partition:
         //

+ 15 - 15
tests/test/alglib/u_testconvunit.pp

@@ -67,7 +67,7 @@ begin
     InvErrors := False;
     InvRErrors := False;
     WasErrors := False;
-    
+
     //
     // Test against reference O(N^2) implementation.
     //
@@ -87,7 +87,7 @@ begin
                 RKind:=-3;
                 while RKind<=1 do
                 begin
-                    
+
                     //
                     // skip impossible combinations of parameters:
                     // * circular convolution, M<N, RKind<>-3 - internal subroutine does not support M<N.
@@ -97,7 +97,7 @@ begin
                         Inc(RKind);
                         Continue;
                     end;
-                    
+
                     //
                     // Complex convolution
                     //
@@ -120,7 +120,7 @@ begin
                     SetLength(CR1, 1);
                     if RKind=-3 then
                     begin
-                        
+
                         //
                         // test wrapper subroutine:
                         // * circular/non-circular
@@ -136,13 +136,13 @@ begin
                     end
                     else
                     begin
-                        
+
                         //
                         // test internal subroutine
                         //
                         if M>=N then
                         begin
-                            
+
                             //
                             // test internal subroutine:
                             // * circular/non-circular mode
@@ -151,7 +151,7 @@ begin
                         end
                         else
                         begin
-                            
+
                             //
                             // test internal subroutine - circular mode only
                             //
@@ -185,7 +185,7 @@ begin
                             Inc(I);
                         end;
                     end;
-                    
+
                     //
                     // Real convolution
                     //
@@ -206,7 +206,7 @@ begin
                     SetLength(RR1, 1);
                     if RKind=-3 then
                     begin
-                        
+
                         //
                         // test wrapper subroutine:
                         // * circular/non-circular
@@ -224,7 +224,7 @@ begin
                     begin
                         if M>=N then
                         begin
-                            
+
                             //
                             // test internal subroutine:
                             // * circular/non-circular mode
@@ -233,7 +233,7 @@ begin
                         end
                         else
                         begin
-                            
+
                             //
                             // test internal subroutine - non-circular mode only
                             //
@@ -276,7 +276,7 @@ begin
     end;
     RefErrors := RefErrors or AP_FP_Greater(RefErr,ErrTol);
     RefRErrors := RefRErrors or AP_FP_Greater(RefRErr,ErrTol);
-    
+
     //
     // Test inverse convolution
     //
@@ -288,7 +288,7 @@ begin
         N:=1;
         while N<=MaxN do
         begin
-            
+
             //
             // Complex circilar and non-circular
             //
@@ -328,7 +328,7 @@ begin
                 InvErr := Max(InvErr, AbsComplex(C_Sub(CR1[I],CA[I])));
                 Inc(I);
             end;
-            
+
             //
             // Real circilar and non-circular
             //
@@ -372,7 +372,7 @@ begin
     end;
     InvErrors := InvErrors or AP_FP_Greater(InvErr,ErrTol);
     InvRErrors := InvRErrors or AP_FP_Greater(InvRErr,ErrTol);
-    
+
     //
     // end
     //

+ 4 - 4
tests/test/alglib/u_testcorrunit.pp

@@ -85,7 +85,7 @@ begin
     InvErrors := False;
     InvRErrors := False;
     WasErrors := False;
-    
+
     //
     // Test against reference O(N^2) implementation.
     //
@@ -97,7 +97,7 @@ begin
         N:=1;
         while N<=MaxN do
         begin
-            
+
             //
             // Complex correlation
             //
@@ -135,7 +135,7 @@ begin
                 RefErr := Max(RefErr, AbsComplex(C_Sub(CR1[I],CR2[I])));
                 Inc(I);
             end;
-            
+
             //
             // Real correlation
             //
@@ -177,7 +177,7 @@ begin
     end;
     RefErrors := RefErrors or AP_FP_Greater(RefErr,ErrTol);
     RefRErrors := RefRErrors or AP_FP_Greater(RefRErr,ErrTol);
-    
+
     //
     // end
     //

+ 11 - 11
tests/test/alglib/u_testfftunit.pp

@@ -55,7 +55,7 @@ begin
     RefRErrors := False;
     REIntErrors := False;
     WasErrors := False;
-    
+
     //
     // Test bi-directional error: norm(x-invFFT(FFT(x)))
     //
@@ -64,7 +64,7 @@ begin
     N:=1;
     while N<=MaxN do
     begin
-        
+
         //
         // Complex FFT/invFFT
         //
@@ -91,7 +91,7 @@ begin
             BiDiErr := Max(BiDiErr, AbsComplex(C_Sub(A1[I],A3[I])));
             Inc(I);
         end;
-        
+
         //
         // Real
         //
@@ -117,7 +117,7 @@ begin
     end;
     BiDiErrors := BiDiErrors or AP_FP_Greater(BiDiErr,ErrTol);
     BiDiRErrors := BiDiRErrors or AP_FP_Greater(BiDiRErr,ErrTol);
-    
+
     //
     // Test against reference O(N^2) implementation
     //
@@ -126,7 +126,7 @@ begin
     N:=1;
     while N<=MaxN do
     begin
-        
+
         //
         // Complex FFT
         //
@@ -148,7 +148,7 @@ begin
             RefErr := Max(RefErr, AbsComplex(C_Sub(A1[I],A2[I])));
             Inc(I);
         end;
-        
+
         //
         // Complex inverse FFT
         //
@@ -170,7 +170,7 @@ begin
             RefErr := Max(RefErr, AbsComplex(C_Sub(A1[I],A2[I])));
             Inc(I);
         end;
-        
+
         //
         // Real forward/inverse FFT:
         // * calculate and check forward FFT
@@ -224,7 +224,7 @@ begin
     end;
     RefErrors := RefErrors or AP_FP_Greater(RefErr,ErrTol);
     RefRErrors := RefRErrors or AP_FP_Greater(RefRErr,ErrTol);
-    
+
     //
     // test internal real even FFT
     //
@@ -233,7 +233,7 @@ begin
     while K<=MaxN div 2 do
     begin
         N := 2*K;
-        
+
         //
         // Real forward FFT
         //
@@ -259,7 +259,7 @@ begin
             REIntErr := Max(REIntErr, AbsReal(R1[2*I+1]-A2[I].Y));
             Inc(I);
         end;
-        
+
         //
         // Real backward FFT
         //
@@ -293,7 +293,7 @@ begin
         Inc(K);
     end;
     REIntErrors := REIntErrors or AP_FP_Greater(REIntErr,ErrTol);
-    
+
     //
     // end
     //

+ 6 - 6
tests/test/alglib/u_testfhtunit.pp

@@ -35,7 +35,7 @@ begin
     BiDiErrors := False;
     RefErrors := False;
     WasErrors := False;
-    
+
     //
     // Test bi-directional error: norm(x-invFHT(FHT(x)))
     //
@@ -43,7 +43,7 @@ begin
     N:=1;
     while N<=MaxN do
     begin
-        
+
         //
         // FHT/invFHT
         //
@@ -72,7 +72,7 @@ begin
         Inc(N);
     end;
     BiDiErrors := BiDiErrors or AP_FP_Greater(BiDiErr,ErrTol);
-    
+
     //
     // Test against reference O(N^2) implementation
     //
@@ -80,7 +80,7 @@ begin
     N:=1;
     while N<=MaxN do
     begin
-        
+
         //
         // FHT
         //
@@ -101,7 +101,7 @@ begin
             RefErr := Max(RefErr, AbsReal(R1[I]-R2[I]));
             Inc(I);
         end;
-        
+
         //
         // inverse FHT
         //
@@ -125,7 +125,7 @@ begin
         Inc(N);
     end;
     RefErrors := RefErrors or AP_FP_Greater(RefErr,ErrTol);
-    
+
     //
     // end
     //

+ 2 - 2
tests/test/cg/obj/readme.txt

@@ -27,11 +27,11 @@ Solaris-x86_64 : gcc (GCC) 3.4.3 (csl-sol210-3_4-20050802) with -m64 option
 
 Freebsd-x86_64 : gcc (GCC) 4.2.1 20070719  [FreeBSD]
 
-OpenBSD-i386 : gcc (GCC) 4.2.1 20070719 
+OpenBSD-i386 : gcc (GCC) 4.2.1 20070719
 NetBSD-i386 : gcc (GCC) 4.1.3 20080704 prerelease (NetBSD nb2 20081120)
 FreeBSD-i386 : gcc (GCC) 4.2.1 20070719  [FreeBSD] 8.2-RELEASE
 Linux-sparc : gcc (Debian 4.3.2-1.1) 4.3.2
-OpenBSD-x86_64 : gcc (GCC) 4.2.1 20070719 
+OpenBSD-x86_64 : gcc (GCC) 4.2.1 20070719
 NetBSD-x86_64 : gcc (GCC) 4.1.3 20080704 prerelease (NetBSD nb2 20081120)
 Linux-arm-gnueabihf : gcc version 4.6.3 (Debian 4.6.3-8+rpi1)
 Linux-mipsel : gcc (Debian 4.4.5-8) 4.4.5

+ 2 - 2
tests/test/cg/tadint64.pp

@@ -415,7 +415,7 @@ begin
  if j <> k then
    result := false;
 
- { Since qword variable<>negative constant is always false according to the 
+ { Since qword variable<>negative constant is always false according to the
    compiler (allowing it to optimize the if away) we need to do a preventive
    typecast to qword.}
  if j <> qword(1000000000-(qword(1000000000) * 10)) then
@@ -426,7 +426,7 @@ begin
    result := false;
 
  i := 1 - j;
- { Since qword variable<>negative constant is always false according to the 
+ { Since qword variable<>negative constant is always false according to the
    compiler (allowing it to optimize the if away) we need to do a preventive
    typecast to qword.}
  if i <> qword(1-(qword(1) shl 33)) then

+ 12 - 12
tests/test/cg/tcalcla1.pp

@@ -39,10 +39,10 @@ program tcalcla1;
    RESULT_U16BIT = 2*RESULT_U8BIT;
    RESULT_S32BIT = $500F0000;
    RESULT_S64BIT = $500F0000;
-{$ifdef cpuhasfloats}   
+{$ifdef cpuhasfloats}
    RESULT_S32REAL = 1777.12;
    RESULT_S64REAL = 3444.24;
-{$endif cpuhasfloats}   
+{$endif cpuhasfloats}
    RESULT_BOOL8BIT = 1;
    RESULT_BOOL16BIT = 1;
    RESULT_BOOL32BIT = 1;
@@ -80,10 +80,10 @@ program tcalcla1;
   global_u8bit : byte;
   global_u16bit : word;
   global_s32bit : longint;
-{$ifdef cpuhasfloats}   
+{$ifdef cpuhasfloats}
   global_s32real : single;
   global_s64real : double;
-{$endif cpuhasfloats}   
+{$endif cpuhasfloats}
   global_ptr : pchar;
   global_proc : tprocedure;
   global_bigstring : shortstring;
@@ -95,10 +95,10 @@ program tcalcla1;
   value_u8bit : byte;
   value_u16bit : word;
   value_s32bit : longint;
-{$ifdef cpuhasfloats}   
+{$ifdef cpuhasfloats}
   value_s32real : single;
   value_s64real  : double;
-{$endif cpuhasfloats}   
+{$endif cpuhasfloats}
   value_proc : tprocedure;
   value_ptr : pchar;
   value_smallrec : tsmallrecord;
@@ -123,10 +123,10 @@ program tcalcla1;
        global_u8bit := 0;
        global_u16bit := 0;
        global_s32bit := 0;
-{$ifdef cpuhasfloats}   
+{$ifdef cpuhasfloats}
        global_s32real := 0.0;
        global_s64real := 0.0;
-{$endif cpuhasfloats}   
+{$endif cpuhasfloats}
        global_ptr := nil;
        global_proc := nil;
        global_bigstring := '';
@@ -141,10 +141,10 @@ program tcalcla1;
        value_u8bit := 0;
        value_u16bit := 0;
        value_s32bit := 0;
-{$ifdef cpuhasfloats}   
+{$ifdef cpuhasfloats}
        value_s32real := 0.0;
        value_s64real  := 0.0;
-{$endif cpuhasfloats}   
+{$endif cpuhasfloats}
        value_proc := nil;
        value_ptr := nil;
        fillchar(value_smallrec, sizeof(value_smallrec), #0);
@@ -156,9 +156,9 @@ program tcalcla1;
        fillchar(value_smallarray, sizeof(value_smallarray), #0);
        value_boolean := false;
        value_char:=#0;
-{$ifdef FPC_HAS_FEATURE_ANSISTRINGS}   
+{$ifdef FPC_HAS_FEATURE_ANSISTRINGS}
        value_ansistring := '';
-{$endif FPC_HAS_FEATURE_ANSISTRINGS}   
+{$endif FPC_HAS_FEATURE_ANSISTRINGS}
        value_s64bit := 0;
       end;
 

+ 1 - 1
tests/test/cg/tcalext.pp

@@ -700,7 +700,7 @@ begin
 
   Write('pchar function result testing...');
   failed := false;
-  
+
   { verify if the contents both strings are equal }
   pc := test_function_pchar;
   if strcomp(pc, RESULT_PCHAR) <> 0 then

+ 60 - 60
tests/test/cg/tcnvint1.pp

@@ -40,217 +40,217 @@ begin
  b1 := TRUE;
  tobyte := byte(b1);
  WriteLn('boolean->byte : value should be 1...',tobyte);
- if tobyte <> 1 then 
+ if tobyte <> 1 then
    halt(1);
  b1 := FALSE;
  tobyte := byte(b1);
  WriteLn('boolean->byte : value should be 0...',tobyte);
- if tobyte <> 0 then 
+ if tobyte <> 0 then
    halt(1);
  b1 := TRUE;
  toword := word(b1);
  WriteLn('boolean->word : value should be 1...',toword);
- if toword <> 1 then 
+ if toword <> 1 then
    halt(1);
  b1 := FALSE;
  toword := word(b1);
  WriteLn('boolean->word : value should be 0...',toword);
- if toword <> 0 then 
+ if toword <> 0 then
    halt(1);
  b1 := TRUE;
  tolong := longint(b1);
  WriteLn('boolean->longint : value should be 1...',tolong);
- if tolong <> 1 then 
+ if tolong <> 1 then
    halt(1);
  b1 := FALSE;
  tolong := longint(b1);
  WriteLn('boolean->longint : value should be 0...',tolong);
- if tolong <> 0 then 
+ if tolong <> 0 then
    halt(1);
  bb1 := TRUE;
  tobyte := byte(bb1);
  WriteLn('bytebool->byte : value should be 255...',tobyte);
- if tobyte <> 255 then 
+ if tobyte <> 255 then
    halt(1);
  bb1 := FALSE;
  tobyte := byte(bb1);
  WriteLn('bytebool->byte : value should be 0...',tobyte);
- if tobyte <> 0 then 
+ if tobyte <> 0 then
    halt(1);
  bb1 := TRUE;
  toword := word(bb1);
  WriteLn('bytebool->word : value should be 65535...',toword);
- if toword <> 65535 then 
+ if toword <> 65535 then
    halt(1);
  bb1 := FALSE;
  toword := word(bb1);
  WriteLn('bytebool->word : value should be 0...',toword);
- if toword <> 0 then 
+ if toword <> 0 then
    halt(1);
  bb1 := TRUE;
  tolong := longint(bb1);
  WriteLn('bytebool->longint : value should be -1...',tolong);
- if tolong <> -1 then 
+ if tolong <> -1 then
    halt(1);
  bb1 := FALSE;
  tolong := longint(bb1);
  WriteLn('bytebool->longint : value should be 0...',tolong);
- if tolong <> 0 then 
+ if tolong <> 0 then
    halt(1);
  wb1 := TRUE;
  tobyte := byte(wb1);
  WriteLn('wordbool->byte : value should be 255...',tobyte);
- if tobyte <> 255 then 
+ if tobyte <> 255 then
    halt(1);
  wb1 := FALSE;
  tobyte := byte(wb1);
  WriteLn('wordbool->byte : value should be 0...',tobyte);
- if tobyte <> 0 then 
+ if tobyte <> 0 then
    halt(1);
  wb1 := TRUE;
  toword := word(wb1);
  WriteLn('wordbool->word : value should be 65535...',toword);
- if toword <> 65535 then 
+ if toword <> 65535 then
    halt(1);
  wb1 := FALSE;
  toword := word(wb1);
  WriteLn('wordbool->word : value should be 0...',toword);
- if toword <> 0 then 
+ if toword <> 0 then
    halt(1);
  wb1 := TRUE;
  tolong := longint(wb1);
  WriteLn('wordbool->longint : value should be -1...',tolong);
- if tolong <> -1 then 
+ if tolong <> -1 then
    halt(1);
  wb1 := FALSE;
  tolong := longint(wb1);
  WriteLn('wordbool->longint : value should be 0...',tolong);
- if tolong <> 0 then 
+ if tolong <> 0 then
    halt(1);
 {$ifndef tp}
  b1 := TRUE;
  toint64 :=int64(b1);
  WriteLn('boolean->int64 : value should be 1...',toint64);
- if toint64 <> 1 then 
+ if toint64 <> 1 then
    halt(1);
  b1 := FALSE;
  toint64 :=int64(b1);
  WriteLn('boolean->int64 : value should be 0...',toint64);
- if toint64 <> 0 then 
+ if toint64 <> 0 then
    halt(1);
  bb1 := TRUE;
  toint64 :=int64(bb1);
  WriteLn('bytebool->int64 : value should be -1...',toint64);
- if toint64 <> -1 then 
+ if toint64 <> -1 then
    halt(1);
  bb1 := FALSE;
  toint64 :=int64(bb1);
  WriteLn('bytebool->int64 : value should be 0...',toint64);
- if toint64 <> 0 then 
+ if toint64 <> 0 then
    halt(1);
  wb1 := TRUE;
  toint64 :=int64(wb1);
  WriteLn('wordbool->int64 : value should be -1...',toint64);
- if toint64 <> -1 then 
+ if toint64 <> -1 then
    halt(1);
  wb1 := FALSE;
  toint64 :=int64(wb1);
  WriteLn('wordbool->int64 : value should be 0...',toint64);
- if toint64 <> 0 then 
+ if toint64 <> 0 then
    halt(1);
 {$endif}
  lb1 := TRUE;
  tobyte := byte(lb1);
  WriteLn('longbool->byte : value should be 255...',tobyte);
- if tobyte <> 255 then 
+ if tobyte <> 255 then
    halt(1);
  lb1 := FALSE;
  tobyte := byte(lb1);
  WriteLn('longbool->byte : value should be 0...',tobyte);
- if tobyte <> 0 then 
+ if tobyte <> 0 then
    halt(1);
  lb1 := TRUE;
  toword := word(lb1);
  WriteLn('longbool->word : value should be 65535...',toword);
- if toword <> 65535 then 
+ if toword <> 65535 then
    halt(1);
  lb1 := FALSE;
  toword := word(lb1);
  WriteLn('longbool->word : value should be 0...',toword);
- if toword <> 0 then 
+ if toword <> 0 then
    halt(1);
  lb1 := TRUE;
  tolong := longint(lb1);
  WriteLn('longbool->longint : value should be -1...',tolong);
- if tolong <> -1 then 
+ if tolong <> -1 then
    halt(1);
  lb1 := FALSE;
  tolong := longint(lb1);
  WriteLn('longbool->longint : value should be 0...',tolong);
- if tolong <> 0 then 
+ if tolong <> 0 then
    halt(1);
  { left : LOC_REGISTER }
  { from : LOC_REFERENCE }
  wb1 := TRUE;
  b2 := wb1;
  WriteLn('wordbool->boolean : value should be TRUE...',b2);
- if not b2 then 
+ if not b2 then
    halt(1);
  wb1 := FALSE;
  b2 := wb1;
  WriteLn('wordbool->boolean : value should be FALSE...',b2);
- if b2 then 
+ if b2 then
    halt(1);
  lb1 := TRUE;
  b2 := lb1;
  WriteLn('longbool->boolean : value should be TRUE...',b2);
- if not b2 then 
+ if not b2 then
    halt(1);
  lb1 := FALSE;
  b2 := lb1;
  WriteLn('longbool->boolean : value should be FALSE...',b2);
- if b2 then 
+ if b2 then
    halt(1);
 
  wb1 := TRUE;
  bb2 := wb1;
  WriteLn('wordbool->bytebool : value should be TRUE...',bb2);
- if not bb2 then 
+ if not bb2 then
    halt(1);
  wb1 := FALSE;
  bb2 := wb1;
  WriteLn('wordbool->bytebool : value should be FALSE...',bb2);
- if bb2 then 
+ if bb2 then
    halt(1);
  lb1 := TRUE;
  bb2 := lb1;
  WriteLn('longbool->bytebool : value should be TRUE...',bb2);
- if not bb2 then 
+ if not bb2 then
    halt(1);
  lb1 := FALSE;
  bb2 := lb1;
  WriteLn('longbool->bytebool : value should be FALSE...',bb2);
- if bb2 then 
+ if bb2 then
    halt(1);
  b1 := TRUE;
  lb2 := b1;
  WriteLn('boolean->longbool : value should be TRUE...',lb2);
- if not lb2 then 
+ if not lb2 then
    halt(1);
  b1 := FALSE;
  lb2 := b1;
  WriteLn('boolean->longbool : value should be FALSE...',lb2);
- if lb2 then 
+ if lb2 then
    halt(1);
  bb1 := TRUE;
  lb2 := bb1;
  WriteLn('bytebool->longbool : value should be TRUE...',lb2);
- if not lb2 then 
+ if not lb2 then
    halt(1);
  bb1 := FALSE;
  lb2 := bb1;
  WriteLn('bytebool->longbool : value should be FALSE...',lb2);
- if lb2 then 
+ if lb2 then
    halt(1);
  { left : LOC_REGISTER }
  { from : LOC_JUMP     }
@@ -259,50 +259,50 @@ begin
  tobyte := 1;
  tobyte:=byte(toword > tobyte);
  WriteLn('value should be 0...',tobyte);
- if tobyte <> 0 then 
+ if tobyte <> 0 then
    halt(1);
  toword := 2;
  tobyte := 1;
  tobyte:=byte(toword > tobyte);
  WriteLn('value should be 1...',tobyte);
- if tobyte <> 1 then 
+ if tobyte <> 1 then
    halt(1);
  toword := 0;
  tobyte := 1;
  toword:=word(toword > tobyte);
  WriteLn('value should be 0...',toword);
- if toword <> 0 then 
+ if toword <> 0 then
    halt(1);
  toword := 2;
  tobyte := 1;
  toword:=word(toword > tobyte);
  WriteLn('value should be 1...',toword);
- if toword <> 1 then 
+ if toword <> 1 then
    halt(1);
  toword := 0;
  tobyte := 1;
  tolong:=longint(toword > tobyte);
  WriteLn('value should be 0...',tolong);
- if tolong <> 0 then 
+ if tolong <> 0 then
    halt(1);
  toword := 2;
  tobyte := 1;
  tolong:=longint(toword > tobyte);
  WriteLn('value should be 1...',tolong);
- if tolong <> 1 then 
+ if tolong <> 1 then
    halt(1);
 {$ifndef tp}
  toword := 0;
  tobyte := 1;
  toint64:=int64(toword > tobyte);
  WriteLn('value should be 0...',toint64);
- if toint64 <> 0 then 
+ if toint64 <> 0 then
    halt(1);
  toword := 2;
  tobyte := 1;
  toint64:=int64(toword > tobyte);
  WriteLn('value should be 1...',toint64);
- if toint64 <> 1 then 
+ if toint64 <> 1 then
    halt(1);
 {$endif}
  { left : LOC_REGISTER }
@@ -312,60 +312,60 @@ begin
  bb1 := FALSE;
  bb1 := (wb1 <> bb1);
  WriteLn('Value should be TRUE...',bb1);
- if not bb1 then 
+ if not bb1 then
    halt(1);
  wb1 := FALSE;
  bb1 := FALSE;
  bb1 := (wb1 <> bb1);
  WriteLn('Value should be FALSE...',bb1);
- if bb1 then 
+ if bb1 then
    halt(1);
  lb1 := TRUE;
  bb1 := FALSE;
  bb1 := (bb1 = lb1);
  WriteLn('Value should be FALSE...',bb1);
- if bb1 then 
+ if bb1 then
    halt(1);
  lb1 := FALSE;
  bb1 := TRUE;
  bb1 := (bb1 <> lb1);
  WriteLn('Value should be TRUE...',bb1);
- if not bb1 then 
+ if not bb1 then
    halt(1);
  lb1 := TRUE;
  bb1 := FALSE;
  wb1 := (bb1 = lb1);
  WriteLn('Value should be FALSE...',wb1);
- if wb1 then 
+ if wb1 then
    halt(1);
  lb1 := TRUE;
  bb1 := TRUE;
  wb1 := (bb1 = lb1);
  WriteLn('Value should be TRUE...',wb1);
- if not wb1 then 
+ if not wb1 then
    halt(1);
  lb1 := TRUE;
  bb1 := FALSE;
  lb1 := (bb1 = lb1);
  WriteLn('Value should be FALSE...',lb1);
- if lb1 then 
+ if lb1 then
    halt(1);
  lb1 := FALSE;
  bb1 := FALSE;
  lb1 := (bb1 = lb1);
  WriteLn('Value should be TRUE...',lb1);
- if not lb1 then 
+ if not lb1 then
    halt(1);
  bb1 := TRUE;
  bb2 := FALSE;
  lb1 := (bb1 <> bb2);
  WriteLn('Value should be TRUE...',lb1);
- if not lb1 then 
+ if not lb1 then
    halt(1);
  bb1 := FALSE;
  bb2 := TRUE;
  lb1 := (bb1 = bb2);
  WriteLn('Value should be FALSE...',lb1);
- if lb1 then 
+ if lb1 then
    halt(1);
 end.

+ 5 - 5
tests/test/cg/tcond1.pp

@@ -3,7 +3,7 @@
 
 { This test evaluates OptPass2Jcc's ability to create CMOV instructions with
   constants while ensuring correct code is still generated. }
-  
+
 program tcond1;
 
 uses
@@ -17,7 +17,7 @@ function TestInput(Input, TestAns: LongInt): Boolean;
   var
     O1, O2, O3: LongInt;
   begin
-    if Input < 2 then 
+    if Input < 2 then
       begin
         O1 := -10;
         O2 := TestAns;
@@ -38,19 +38,19 @@ function TestInput(Input, TestAns: LongInt): Boolean;
 
 var
   X: LongInt;
-  
+
 begin
   if not CMOVSupport then
     begin
       WriteLn('unsupported');
       Halt(0);
-    end;      
+    end;
 
   for X := 0 to 3 do
     begin
       if not TestInput(X, X + 3) then
         Halt(1);
     end;
-    
+
   WriteLn('ok');
 end.

+ 1 - 1
tests/test/cg/tcond2.pp

@@ -31,7 +31,7 @@ begin
     begin
       WriteLn('unsupported');
       Halt(0);
-    end;      
+    end;
 
   for X := 0 to 3 do
     begin

+ 1 - 1
tests/test/cg/tcond2a.pp

@@ -35,7 +35,7 @@ begin
     begin
       WriteLn('unsupported');
       Halt(0);
-    end;      
+    end;
 
   for X := 0 to 3 do
     begin

+ 3 - 3
tests/test/cg/tctr1.pp

@@ -12,13 +12,13 @@ constructor tobj.Create;
 begin
   exit;
 end;
- 
+
 procedure tobj.AfterConstruction;
 begin
   ffield:=true;
 end;
- 
- 
+
+
 var
   o: tobj;
 begin

+ 3 - 3
tests/test/cg/tctr1a.pp

@@ -14,13 +14,13 @@ constructor tobj.Create;
 begin
   exit;
 end;
- 
+
 procedure tobj.AfterConstruction;
 begin
   ffield:=true;
 end;
- 
- 
+
+
 var
   o: tobj;
 begin

+ 5 - 5
tests/test/cg/testcompo.pp

@@ -25,7 +25,7 @@
 
 {$mode objfpc}
 
-const 
+const
   NR_NO=0;
   NR_EVAL_STACK_BASE=$55443322;
   NR_STACK_POINTER_REG=$55010101;
@@ -128,7 +128,7 @@ const
       first:=nil;
       last:=nil;
     end;
- 
+
   procedure tasmlist.concat(next : tai);
     begin
       if not assigned(first) then
@@ -180,7 +180,7 @@ const
 
    procedure thlcgjvm.a_cmp_ref_reg_label(list: TAsmList; size: tdef; cmp_op: topcmp; const ref: treference; reg: tregister; l: tasmlabel);
     var
-      extraslots : longint; 
+      extraslots : longint;
     begin
       writeln('a_cmp_ref_reg_label');
       a_load_reg_stack(list,size,reg);
@@ -302,10 +302,10 @@ begin
   l:=tasmlabel.create;
   size:=torddef.create;
   size.size:=1;
-  size.high:=255; 
+  size.high:=255;
   voidpointertype:=torddef.create;
   voidpointertype.size:=sizeof(ptrint);
-  voidpointertype.high:=TCGInt(high(ptrint)); 
+  voidpointertype.high:=TCGInt(high(ptrint));
   hlcg:=thlcgjvm.create;
   hlcg.a_cmp_ref_reg_label(list,size, cmp_op, ref, reg, l);
   writeln('End of test, number of test: ',test_count);

+ 31 - 31
tests/test/cg/tmoddiv2.pp

@@ -9,7 +9,7 @@ var
 	temp, mask1, mask2 : integer;
 begin
 	m := abs(m-1);
-	
+
 	temp := x and m;
 
 	if (x < 0) then begin // = sign bit
@@ -23,8 +23,8 @@ begin
 	end else begin
 		mask1 := 0;
 	end;
-	
-	my_modulus := temp or ((not m) and mask1 and mask2);	
+
+	my_modulus := temp or ((not m) and mask1 and mask2);
 end;
 
 function i32_modulus(x, m : integer) : integer;
@@ -47,7 +47,7 @@ var
 	i : integer;
 	j, k : longint;
 	res, res2 : longint;
-	
+
 	y, z : dword;
 
 begin
@@ -60,7 +60,7 @@ begin
 		assert((j div 19) = (j div k), 'Wrong int32 division by 19 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('Negative int32 division test...');
 	for i := -10000 to 10000 do begin
 		j := random(high(integer));
@@ -78,7 +78,7 @@ begin
 		assert((j div 3) = (j div k), 'Wrong int32 division by 3 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('Negative int32 division test...');
 	for i := -10000 to 10000 do begin
 		j := random(high(integer));
@@ -96,7 +96,7 @@ begin
 		assert((j div 7) = (j div k), 'Wrong int32 division by 7 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('Negative int32 division test...');
 	for i := -10000 to 10000 do begin
 		j := random(high(integer));
@@ -105,7 +105,7 @@ begin
 		assert((j div -7) = (j div k), 'Wrong int32 division by -7 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('positive int32 division test...');
 	for i := -10000 to 10000 do begin
 		j := random(high(integer));
@@ -114,7 +114,7 @@ begin
 		assert((j div 5) = (j div k), 'Wrong int32 division by 5 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('Negative int32 division test...');
 	for i := -10000 to 10000 do begin
 		j := random(high(integer));
@@ -123,7 +123,7 @@ begin
 		assert((j div -5) = (j div k), 'Wrong int32 division by -5 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('positive int32 division test...');
 	for i := -10000 to 10000 do begin
 		j := random(high(integer));
@@ -132,7 +132,7 @@ begin
 		assert((j div 512) = (j div k), 'Wrong int32 division by 512 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('Negative int32 division test...');
 	for i := -10000 to 10000 do begin
 		j := random(high(integer));
@@ -141,9 +141,9 @@ begin
 		assert((j div -512) = (j div k), 'Wrong int32 division by -512 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 //-----------------------------------------------------------------
-	
+
 	write('positive int32 modulus test (19)...');
 	for i := -10000 to 10000 do begin
 		j := random(high(integer));
@@ -152,7 +152,7 @@ begin
 		assert((j mod 19) = (i32_modulus(j,k)), 'Wrong int32 modulus by 19 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 
 	write('Negative int32 modulus test (-19)...');
 	for i := -10000 to 10000 do begin
@@ -164,7 +164,7 @@ begin
 		assert((res = res2), 'Int32 mod by -19 j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2) + ' is ' + hexstr(res, 8) + ' ' + hexstr(res2, 8));
 	end;
 	writeln('Success.');
-	
+
 	write('positive int32 modulus test (3)...');
 	for i := -10000 to 10000 do begin
 		j := random(high(integer));
@@ -173,7 +173,7 @@ begin
 		assert((j mod 3) = (i32_modulus(j,k)), 'Wrong int32 modulus by 3 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 
 	write('Negative int32 modulus test (-3)...');
 	for i := -10000 to 10000 do begin
@@ -185,7 +185,7 @@ begin
 		assert((res = res2), 'Int32 mod by -3 j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2) + ' is ' + hexstr(res, 8) + ' ' + hexstr(res2, 8));
 	end;
 	writeln('Success.');
-	
+
 	write('positive int32 modulus test (5)...');
 	for i := -10000 to 10000 do begin
 		j := random(high(integer));
@@ -194,7 +194,7 @@ begin
 		assert((j mod 5) = (i32_modulus(j,k)), 'Wrong int32 modulus by 5 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 
 	write('Negative int32 modulus test (-5)...');
 	for i := -10000 to 10000 do begin
@@ -206,7 +206,7 @@ begin
 		assert((res = res2), 'Int32 mod by -5 j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2) + ' is ' + hexstr(res, 8) + ' ' + hexstr(res2, 8));
 	end;
 	writeln('Success.');
-	
+
 	write('positive int32 modulus test (7)...');
 	for i := -10000 to 10000 do begin
 		j := random(high(integer));
@@ -215,7 +215,7 @@ begin
 		assert((j mod 7) = (i32_modulus(j,k)), 'Wrong int32 modulus by 7 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 
 	write('Negative int32 modulus test (-7)...');
 	for i := -10000 to 10000 do begin
@@ -227,7 +227,7 @@ begin
 		assert((res = res2), 'Int32 mod by -7 j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2) + ' is ' + hexstr(res, 8) + ' ' + hexstr(res2, 8));
 	end;
 	writeln('Success.');
-	
+
 	write('positive int32 modulus test (512)...');
 	for i := -10000 to 10000 do begin
 		j := random(high(integer));
@@ -236,7 +236,7 @@ begin
 		assert((j mod 512) = (i32_modulus(j,k)), 'Wrong int32 modulus by 512 for j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2));
 	end;
 	writeln('Success.');
-	
+
 
 	write('Negative int32 modulus test (-512)...');
 	for i := -10000 to 10000 do begin
@@ -248,7 +248,7 @@ begin
 		assert((res = res2), 'Int32 mod by -512 j=' + hexstr(j,sizeof(j)*2) + ' k=' + hexstr(k, sizeof(k)*2) + ' is ' + hexstr(res, 8) + ' ' + hexstr(res2, 8));
 	end;
 	writeln('Success.');
-	
+
 	write('positive uint32 division test (19)...');
 	for i := -10000 to 10000 do begin
 		y := random(high(integer));
@@ -257,7 +257,7 @@ begin
 		assert((y div 19) = (y div z), 'Wrong uint32 division by 19 for y=' + hexstr(y,sizeof(y)*2) + ' z=' + hexstr(z, sizeof(z)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('positive uint32 modulus test (19)...');
 	for i := -10000 to 10000 do begin
 		y := random(high(integer));
@@ -266,7 +266,7 @@ begin
 		assert((y mod 19) = (u32_modulus(y,z)), 'Wrong uint32 modulus by 19 for y=' + hexstr(y,sizeof(y)*2) + ' z=' + hexstr(z, sizeof(z)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('positive uint32 division test (3)...');
 	for i := -10000 to 10000 do begin
 		y := random(high(integer));
@@ -284,7 +284,7 @@ begin
 		assert((y mod 3) = (u32_modulus(y,z)), 'Wrong uint32 modulus by 3 for y=' + hexstr(y,sizeof(y)*2) + ' z=' + hexstr(z, sizeof(z)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('positive uint32 division test (5)...');
 	for i := -10000 to 10000 do begin
 		y := random(high(integer));
@@ -293,7 +293,7 @@ begin
 		assert((y div 5) = (y div z), 'Wrong uint32 division by 5 for y=' + hexstr(y,sizeof(y)*2) + ' z=' + hexstr(z, sizeof(z)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('positive uint32 modulus test (5)...');
 	for i := -10000 to 10000 do begin
 		y := random(high(integer));
@@ -302,7 +302,7 @@ begin
 		assert((y mod 5) = (u32_modulus(y,z)), 'Wrong uint32 modulus by 5 for y=' + hexstr(y,sizeof(y)*2) + ' z=' + hexstr(z, sizeof(z)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('positive uint32 division test (7)...');
 	for i := -10000 to 10000 do begin
 		y := random(high(integer));
@@ -311,7 +311,7 @@ begin
 		assert((y div 7) = (y div z), 'Wrong uint32 division by 7 for y=' + hexstr(y,sizeof(y)*2) + ' z=' + hexstr(z, sizeof(z)*2));
 	end;
 	writeln('Success.');
-	
+
 	write('positive uint32 modulus test (7)...');
 	for i := -10000 to 10000 do begin
 		y := random(high(integer));
@@ -319,8 +319,8 @@ begin
 		z := 7;
 		assert((y mod 7) = (u32_modulus(y,z)), 'Wrong uint32 modulus by 7 for y=' + hexstr(y,sizeof(y)*2) + ' z=' + hexstr(z, sizeof(z)*2));
 	end;
-	writeln('Success.');	
-	
+	writeln('Success.');
+
 
 	write('positive uint32 division test (512)...');
 	for i := -10000 to 10000 do begin

+ 21 - 21
tests/test/cg/toverflow.inc

@@ -9,7 +9,7 @@
 program toverflow;
 uses
   SysUtils;
-  
+
   function TestOverflow32(Initial: LongWord; Subtract, OverflowExpected: Boolean): Boolean;
     var
       Output: LongWord;
@@ -19,15 +19,15 @@ uses
         Write('Testing 32-bit subtraction of 128 from ', Initial, '... ')
       else
         Write('Testing 32-bit addition of 128 to ', Initial, '... ');
-    
+
       try
         if Subtract then
           Output := Initial - $80
         else
           Output := Initial + $80;
-      
+
         Write('no exception... ');
-        
+
         if OverflowExpected then
           begin
             WriteLn('FAIL: Overflow not triggered then it should have');
@@ -49,10 +49,10 @@ uses
                 Exit(True);
               end;
           end
-          
+
       except
         on E: ERangeError do
-          if not OverflowExpected then 
+          if not OverflowExpected then
             begin
               WriteLn('FAIL: Range error triggered when it shouldn''t have');
               Exit(True);
@@ -61,7 +61,7 @@ uses
             Write('ERangeError triggered... ');
 
         on E: EIntOverflow do
-          if not OverflowExpected then 
+          if not OverflowExpected then
             begin
               WriteLn('FAIL: Overflow triggered when it shouldn''t have');
               Exit(True);
@@ -75,10 +75,10 @@ uses
             Exit(True);
           end;
       end;
-      
+
       WriteLn('Pass');
     end;
-  
+
   function TestOverflow64(Initial: QWord; Subtract, OverflowExpected: Boolean): Boolean;
     var
       Output: QWord;
@@ -88,15 +88,15 @@ uses
         Write('Testing 64-bit subtraction of 128 from ', Initial, '... ')
       else
         Write('Testing 64-bit addition of 128 to ', Initial, '... ');
-    
+
       try
         if Subtract then
           Output := Initial - $80
         else
           Output := Initial + $80;
-          
+
         Write('no exception... ');
-      
+
         if OverflowExpected then
           begin
             WriteLn('FAIL: Overflow not triggered then it should have');
@@ -118,10 +118,10 @@ uses
                 Exit(True);
               end;
           end
-          
+
       except
         on E: ERangeError do
-          if not OverflowExpected then 
+          if not OverflowExpected then
             begin
               WriteLn('FAIL: Range error triggered when it shouldn''t have');
               Exit(True);
@@ -130,7 +130,7 @@ uses
             Write('ERangeError triggered... ');
 
         on E: EIntOverflow do
-          if not OverflowExpected then 
+          if not OverflowExpected then
             begin
               WriteLn('FAIL: Overflow triggered when it shouldn''t have');
               Exit(True);
@@ -144,7 +144,7 @@ uses
             Exit(True);
           end;
       end;
-      
+
       WriteLn('Pass');
     end;
 
@@ -156,25 +156,25 @@ begin
   Fail := TestOverflow32($FFFFFF80, False, True) or Fail; { Result is zero and overflows }
   Fail := TestOverflow32($FFFFFF81, False, True) or Fail;
   Fail := TestOverflow32($FFFFFFFF, False, True) or Fail;
-  
+
   { 32-bit subtract }
   Fail := TestOverflow32($81, True, False) or Fail;
   Fail := TestOverflow32($80, True, False) or Fail; { Result is zero but doesn't overflow }
   Fail := TestOverflow32($7F, True, True) or Fail;
-  Fail := TestOverflow32($0, True, True) or Fail;  
+  Fail := TestOverflow32($0, True, True) or Fail;
 
   { 64-bit add }
   Fail := TestOverflow64(QWord($FFFFFFFFFFFFFF7F), False, False) or Fail;
   Fail := TestOverflow64(QWord($FFFFFFFFFFFFFF80), False, True) or Fail; { Result is zero and overflows }
   Fail := TestOverflow64(QWord($FFFFFFFFFFFFFF81), False, True) or Fail;
   Fail := TestOverflow64(QWord($FFFFFFFFFFFFFFFF), False, True) or Fail;
-  
+
   { 64-bit subtract }
   Fail := TestOverflow64($81, True, False) or Fail;
   Fail := TestOverflow64($80, True, False) or Fail; { Result is zero but doesn't overflow }
   Fail := TestOverflow64($7F, True, True) or Fail;
-  Fail := TestOverflow64($0, True, True) or Fail;  
-  
+  Fail := TestOverflow64($0, True, True) or Fail;
+
   ExitCode := LongInt(Fail);
   if not Fail then
     WriteLn('ok');

+ 4 - 4
tests/test/cg/tpara2.pp

@@ -28,11 +28,11 @@ type
         end;
 
         RGBColor = record
-                red:                                    UInt16;                 
+                red:                                    UInt16;
                                                 { magnitude of red component }
-                green:                                  UInt16;                 
+                green:                                  UInt16;
                                                 { magnitude of green component }
-                blue:                                   UInt16;                 
+                blue:                                   UInt16;
                                                 { magnitude of blue component }
         end;
 
@@ -41,7 +41,7 @@ begin
   test:= r;
 end;
 
-var 
+var
   r: rect;
   c1,c2: rgbcolor;
 begin

+ 2 - 2
tests/test/cg/tsmallrec.pp

@@ -37,7 +37,7 @@ type
 
 const
   r1 : rec1 = ( c1 : 'a' );
-  r2 : rec2 = ( c1 : 'a'; c2 : 'b' ); 
+  r2 : rec2 = ( c1 : 'a'; c2 : 'b' );
   r3 : rec3 = ( c1 : 'a'; c2 : 'b'; c3 : 'c' );
   r4 : rec4 = ( c1 : 'a'; c2 : 'b'; c3 : 'c'; c4 : 'd' );
   r5 : rec5 = ( c1 : 'a'; c2 : 'b'; c3 : 'c'; c4 : 'd'; c5 : 'e' );
@@ -172,4 +172,4 @@ begin
       halt(1);
     end;
 end.
- 
+

+ 4 - 4
tests/test/cg/ttryfin5.pp

@@ -68,7 +68,7 @@ begin
       except
         continue;
       end;
-    end;  
+    end;
   finally
     inc(counter);
   end;
@@ -89,7 +89,7 @@ begin
         if i=2 then
           break;
       end;
-    end; 
+    end;
     inc(counter);
   finally
     inc(counter);
@@ -113,12 +113,12 @@ begin
   test3;
   if counter<>2 then
     Halt(3);
-    
+
   counter:=0;
   test4;
   if counter<>4 then
     Halt(4);
-    
+
   counter:=0;
   test5;
   if counter<>5 then

+ 1 - 1
tests/test/cg/tval1.pp

@@ -21,7 +21,7 @@ begin
 
   if not TryStrToInt('2', Output) then
     Halt(2);
-	
+
   if Output <> 2 then
     Halt(3);
 end;

+ 1 - 1
tests/test/cg/tval1a.pp

@@ -21,7 +21,7 @@ begin
 
   if not TryStrToInt('2', Output) then
     Halt(2);
-	
+
   if Output <> 2 then
     Halt(3);
 end;

+ 1 - 1
tests/test/cg/tval2.pp

@@ -24,7 +24,7 @@ begin
 
   if not TryStrToInt(SResStr[8], Output) then
     Halt(2);
-	
+
   if Output <> 2 then
     Halt(3);
 end;

+ 1 - 1
tests/test/cg/tval2a.pp

@@ -24,7 +24,7 @@ begin
 
   if not TryStrToInt(SResStr[8], Output) then
     Halt(2);
-	
+
   if Output <> 2 then
     Halt(3);
 end;

+ 1 - 1
tests/test/cg/tvec64cmp.pp

@@ -1,4 +1,4 @@
-{ Small test to check correct handling of 
+{ Small test to check correct handling of
   comparison of 64-bit values as boolean
   index of a vector, which lead
   to internal error for riscv32 cpu

+ 1 - 1
tests/test/cg/tvecsimplify1.pp

@@ -11,6 +11,6 @@ end;
 begin
   if GetChar() <> 'y' then
     Halt(1);
-	
+
   WriteLn('ok');
 end.

+ 1 - 1
tests/test/cg/tvecsimplify1a.pp

@@ -12,6 +12,6 @@ end;
 begin
   if GetChar() <> 'y' then
     Halt(1);
-	
+
   WriteLn('ok');
 end.

+ 1 - 1
tests/test/cg/tvecsimplify2.pp

@@ -25,6 +25,6 @@ end;
 begin
   if GetChar() <> 'y' then
     Halt(1);
-	
+
   WriteLn('ok');
 end.

+ 1 - 1
tests/test/cg/tvecsimplify2a.pp

@@ -25,6 +25,6 @@ end;
 begin
   if GetChar() <> 'y' then
     Halt(1);
-	
+
   WriteLn('ok');
 end.

+ 1 - 1
tests/test/cg/tvecsimplify3.pp

@@ -25,6 +25,6 @@ end;
 begin
   if GetChar() <> 'y' then
     Halt(1);
-	
+
   WriteLn('ok');
 end.

+ 1 - 1
tests/test/cg/tvecsimplify4.pp

@@ -25,6 +25,6 @@ end;
 begin
   if GetChar() <> 'y' then
     Halt(1);
-	
+
   WriteLn('ok');
 end.

+ 1 - 1
tests/test/cg/tvectorcall3.pp

@@ -1,4 +1,4 @@
-{ %CPU=x86_64 } 
+{ %CPU=x86_64 }
 program vectorcall_stack_test;
 
 {$IFNDEF CPUX86_64}

+ 1 - 1
tests/test/cg/variants/ivarol10.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp10 = double;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol100.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp100 = currency;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol101.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp101 = currency;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol102.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp102 = double;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol104.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp104 = double;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol105.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp105 = double;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol106.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp106 = double;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol107.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp107 = double;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol108.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp108 = double;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol109.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp109 = double;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol11.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp11 = double;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol110.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp110 = double;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol111.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp111 = currency;
 {$else FPC_COMP_IS_INT64}

+ 1 - 1
tests/test/cg/variants/ivarol112.pp

@@ -6,7 +6,7 @@
 {$endif fpc}
 {$endif bigfile}
 
-type 
+type
 {$ifdef FPC_COMP_IS_INT64}
   comp112 = currency;
 {$else FPC_COMP_IS_INT64}

Some files were not shown because too many files changed in this diff