From 69611ee4871252aa60eeba9421fc3a13b6e8c74b Mon Sep 17 00:00:00 2001 From: flywind <43030857+xflywind@users.noreply.github.com> Date: Fri, 19 Feb 2021 07:09:12 -0600 Subject: [PATCH] Ref #12700 add testcase (#17096) * fix js unsigned integer * better * ref #12700 add testcase --- tests/system/tdollars.nim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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"