* fix js unsigned integer * better * ref #12700 add testcase
This commit is contained in:
parent
4395a26764
commit
69611ee487
1 changed files with 9 additions and 1 deletions
|
|
@ -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"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue