Przeglądaj źródła

* fixed mantis tw7637

git-svn-id: trunk@4995 -
Jonas Maebe 19 lat temu
rodzic
commit
5213992110
3 zmienionych plików z 15 dodań i 1 usunięć
  1. 1 0
      .gitattributes
  2. 1 1
      rtl/objpas/sysutils/sysstr.inc
  3. 13 0
      tests/webtbs/tw7637.pp

+ 1 - 0
.gitattributes

@@ -7554,6 +7554,7 @@ tests/webtbs/tw7489.pp svneol=native#text/plain
 tests/webtbs/tw7527.pp svneol=native#text/plain
 tests/webtbs/tw7567.pp svneol=native#text/plain
 tests/webtbs/tw7568.pp svneol=native#text/plain
+tests/webtbs/tw7637.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain

+ 1 - 1
rtl/objpas/sysutils/sysstr.inc

@@ -1015,7 +1015,7 @@ End;
 
 const
 {$ifdef FPC_HAS_TYPE_EXTENDED}
-  maxdigits = 18;
+  maxdigits = 17;
 {$else}
   maxdigits = 14;
 {$endif}

+ 13 - 0
tests/webtbs/tw7637.pp

@@ -0,0 +1,13 @@
+uses sysutils;
+
+var
+  s: ansistring;
+begin
+  s := format('%e',[1.72]);
+{$ifdef FPC_HAS_TYPE_EXTENDED}
+  if s <> '1.7200000000000000E+000' then
+{$else}
+  if s <> '1.72000000000000E+000' then
+{$endif}
+    halt(1);
+end.