mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-21 06:45:27 +00:00
* fix js unsigned integer * better * ref #12700 add testcase
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user