summary refs log tree commit diff stats
path: root/tests/system/tdollars.nim
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2021-02-19 07:09:12 -0600
committerGitHub <noreply@github.com>2021-02-19 14:09:12 +0100
commit69611ee4871252aa60eeba9421fc3a13b6e8c74b (patch)
treefa9c07a7cb8275dc6d6b93749246d9bfd93ac595 /tests/system/tdollars.nim
parent4395a267646ec677b06e3b0687a64331a646c190 (diff)
downloadNim-69611ee4871252aa60eeba9421fc3a13b6e8c74b.tar.gz
Ref #12700 add testcase (#17096)
* fix js unsigned integer

* better

* ref #12700 add testcase
Diffstat (limited to 'tests/system/tdollars.nim')
-rw-r--r--tests/system/tdollars.nim10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/system/tdollars.nim b/tests/system/tdollars.nim
index 04595c93c..34801d9ee 100644
--- a/tests/system/tdollars.nim
+++ b/tests/system/tdollars.nim
@@ -127,6 +127,15 @@ block:
   block:
     doAssert $(4294967295'u32) == "4294967295"
 
+
+  block:
+    proc foo1(arg: int): string =
+      let x = uint32(arg)
+      $x
+
+    doAssert $foo1(-1) == "4294967295"
+
+
 proc main()=
   block:
     let a = -0.0
@@ -148,7 +157,6 @@ proc main()=
     doAssert $b == "0"
     doAssert $(0) == "0"
 
-
   doAssert $uint32.high == "4294967295"