Selaa lähdekoodia

* patch by J. Gareth Moreton: improve test and benchmark, resolves #35633

git-svn-id: trunk@43671 -
florian 5 vuotta sitten
vanhempi
commit
f62fd437b1
3 muutettua tiedostoa jossa 8 lisäystä ja 4 poistoa
  1. 1 1
      .gitattributes
  2. 4 1
      tests/bench/bcase.pp
  3. 3 2
      tests/test/tcase49.pp

+ 1 - 1
.gitattributes

@@ -14159,7 +14159,7 @@ tests/test/tcase47.pp svneol=native#text/pascal
 tests/test/tcase47_2.pp svneol=native#text/pascal
 tests/test/tcase48.pp svneol=native#text/pascal
 tests/test/tcase48_2.pp svneol=native#text/pascal
-tests/test/tcase49.pp svneol=native#text/pascal
+tests/test/tcase49.pp -text svneol=native#text/pascal
 tests/test/tcase5.pp svneol=native#text/pascal
 tests/test/tcase6.pp svneol=native#text/pascal
 tests/test/tcase7.pp svneol=native#text/pascal

+ 4 - 1
tests/bench/bcase.pp

@@ -12,6 +12,8 @@ function GetRealTime(const st: TSystemTime): Real;
     Result := st.Hour*3600.0 + st.Minute*60.0 + st.Second + st.MilliSecond/1000.0;
   end;
 
+{$push}
+{$warn 5057 off}
 function GetRealTime : Real;
   var
     st:TSystemTime;
@@ -19,6 +21,7 @@ function GetRealTime : Real;
     GetLocalTime(st);
     result:=GetRealTime(st);
   end;
+{$pop}
 
 function IIf(Condition: Boolean; TrueRes, FalseRes: Integer): Integer; inline;
   begin
@@ -2527,7 +2530,7 @@ function TCStyleCascade.WriteResults: Boolean;
 
 procedure TCStyleCascade.DoTestIteration(Iteration: Integer);
   var
-    X, Tmp: Byte; P: TInstructionSet;
+    X, Tmp: Byte;
   label
     Set1, Set2, Set3, Set4, Default;
   begin

+ 3 - 2
tests/test/tcase49.pp

@@ -1,2 +1,3 @@
-{ this benchmark can be used also as a test case }
-{$I ../bench/bcase.pp}
+{ %OPT=-O2 }
+{ this benchmark can be used also as a test case }
+{$I ../bench/bcase.pp}