summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2024-08-09 10:39:40 +0800
committerGitHub <noreply@github.com>2024-08-09 10:39:40 +0800
commitd76ea4f32374a7677b18f0d0f1c07195b0e64d11 (patch)
treedbecfb3caa340300027ee8be1c49898587ab2910
parentc97a20ce492f335067c3e53731f60023fb39ae9d (diff)
downloadNim-d76ea4f32374a7677b18f0d0f1c07195b0e64d11.tar.gz
closes #6549; adds a test case (#23929)
closes #6549
-rw-r--r--tests/stdlib/tsystem.nim18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/stdlib/tsystem.nim b/tests/stdlib/tsystem.nim
index 21dbdb59d..f634ce0c2 100644
--- a/tests/stdlib/tsystem.nim
+++ b/tests/stdlib/tsystem.nim
@@ -4,7 +4,7 @@ discard """
 """
 
 import stdtest/testutils
-import std/assertions
+import std/[assertions, formatfloat]
 
 # TODO: in future work move existing `system` tests here, where they belong
 
@@ -182,3 +182,19 @@ block: # bug #20516
 
   when not defined(js):
     let a = create(Foo)
+
+block: # bug #6549
+  when not defined(js):
+    block:
+      const v = 18446744073709551615'u64
+
+      doAssert $v == "18446744073709551615"
+      doAssert $float32(v) == "1.8446744e+19", $float32(v)
+      doAssert $float64(v) == "1.8446744073709552e+19", $float64(v)
+
+    block:
+      let v = 18446744073709551615'u64
+
+      doAssert $v == "18446744073709551615"
+      doAssert $float32(v) == "1.8446744e+19"
+      doAssert $float64(v) == "1.8446744073709552e+19"