Jelajahi Sumber

* fix compilation of tests on 32-bit systems (doesn't (shouldn't?) change their behavior)

git-svn-id: trunk@42520 -
svenbarth 6 tahun lalu
induk
melakukan
8fc5c9edb2
2 mengubah file dengan 5 tambahan dan 4 penghapusan
  1. 3 3
      tests/webtbs/tw35878.pp
  2. 2 1
      tests/webtbs/tw35878a.pp

+ 3 - 3
tests/webtbs/tw35878.pp

@@ -4,8 +4,8 @@ program random_test;
 const
    l: UInt64 = 6148914691236517205;
 var
-   s,n: UInt64;
-   i,j: UInt64;
+   s,n: UInt32;
+   i,j: UInt32;
 begin
   WriteLn('Experiment:', LineEnding);
   WriteLn(' Draw a natural number r from the intervall [0,l-1] and');
@@ -18,7 +18,7 @@ begin
   l := 6148914691236517205;
   for j := 4 to 18 do
   begin
-    n := (Int64(1) shl j);
+    n := (Int32(1) shl j);
     s := 0;
     for i := 0 to n-1 do
       if Random(Int64(l)) < l div 2 then

+ 2 - 1
tests/webtbs/tw35878a.pp

@@ -1,5 +1,6 @@
 var
-  i, rand, val: int64;
+  rand, val: int64;
+  i: int32;
 begin
   rand:=-5;
   for i:=1 to 10000 do