Browse Source

* fixed for systems where extended = double

Jonas Maebe 21 years ago
parent
commit
cbfa846387
1 changed files with 7 additions and 2 deletions
  1. 7 2
      tests/webtbs/tw2131.pp

+ 7 - 2
tests/webtbs/tw2131.pp

@@ -2,11 +2,16 @@ program bug2131;
 
 var
   TestStr : string;
+  correct : string;
 begin
+  if sizeof(extended) > sizeof(double) then
+    correct := ' 1.8E+0012'
+  else
+    correct := ' 1.8E+012';
   Str (1.789e12:1, TestStr);
-  if (teststr <> ' 1.8E+0012') then
+  if (teststr <> correct) then
     begin
-      writeln('error, got "',teststr,'" expected " 1.8E+0012"');
+      writeln('error, got "',teststr,'" expected "',correct,'"');
       halt(1);
     end
 end.