Ref #12700 add testcase (#17096)

* fix js unsigned integer

* better

* ref #12700 add testcase
This commit is contained in:
flywind 2021-02-19 07:09:12 -06:00 • committed by GitHub
commit 69611ee487
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,6 +127,15 @@ block:
block: block:
doAssert $(4294967295'u32) == "4294967295" doAssert $(4294967295'u32) == "4294967295"
block:
proc foo1(arg: int): string =
let x = uint32(arg)
$x
doAssert $foo1(-1) == "4294967295"
proc main()= proc main()=
block: block:
let a = -0.0 let a = -0.0
@ -148,7 +157,6 @@ proc main()=
doAssert $b == "0" doAssert $b == "0"
doAssert $(0) == "0" doAssert $(0) == "0"
doAssert $uint32.high == "4294967295" doAssert $uint32.high == "4294967295"