diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-11-17 16:24:03 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-11-17 16:24:03 +0100 |
commit | fccdbb3238974622112e08dc9fc168b3a2e07de3 (patch) | |
tree | 73de3182c9cbe71c6486b05ba5fd2ac1e8c358a6 /lib/pure/strutils.nim | |
parent | e61d8166cc12c85816853feb1492a10944cfe0aa (diff) | |
parent | a11be5f21fc11d7aba3028213c77a984fb5594d6 (diff) | |
download | Nim-fccdbb3238974622112e08dc9fc168b3a2e07de3.tar.gz |
Merge branch 'devel' of github.com:nim-lang/Nim into devel
Diffstat (limited to 'lib/pure/strutils.nim')
-rw-r--r-- | lib/pure/strutils.nim | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index 4434ef27b..d773cc7d8 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -1984,7 +1984,7 @@ proc formatBiggestFloat*(f: BiggestFloat, format: FloatFormatMode = ffDefault, # but nothing else is possible: if buf[i] in {'.', ','}: result[i] = decimalsep else: result[i] = buf[i] - when defined(vcc): + when defined(windows): # VS pre 2015 violates the C standard: "The exponent always contains at # least two digits, and only as many more digits as necessary to # represent the exponent." [C11 ยง7.21.6.1] @@ -2478,8 +2478,7 @@ when isMainModule: doAssert formatBiggestFloat(0.00000000001, ffScientific, 1, ',') in ["1,0e-11", "1,0e-011"] # bug #6589 - doAssert formatFloat(123.456, ffScientific, precision = -1) in - ["1.234560e+02", "1.234560e+002"] + doAssert formatFloat(123.456, ffScientific, precision = -1) == "1.234560e+02" doAssert "$# $3 $# $#" % ["a", "b", "c"] == "a c b c" doAssert "${1}12 ${-1}$2" % ["a", "b"] == "a12 bb" |