1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00

add basic int test

This commit is contained in:
Xargin
2017-07-04 00:19:41 +08:00
parent 919a2eff5c
commit 2e10d5fdad
3 changed files with 139 additions and 13 deletions

View File

@ -42,7 +42,10 @@ func (any *floatAny) ToInt64() int64 {
}
func (any *floatAny) ToUint() uint {
return uint(any.val)
if any.val > 0 {
return uint(any.val)
}
return uint(-any.val)
}
func (any *floatAny) ToUint32() uint32 {