1
0
mirror of https://github.com/json-iterator/go.git synced 2025-07-15 23:54:21 +02:00

increase coverage

This commit is contained in:
Xargin
2017-07-05 01:21:33 +08:00
parent ee3313111c
commit 6129e85d53
3 changed files with 85 additions and 13 deletions

View File

@ -45,15 +45,21 @@ func (any *floatAny) ToUint() uint {
if any.val > 0 {
return uint(any.val)
}
return uint(-any.val)
return 0
}
func (any *floatAny) ToUint32() uint32 {
return uint32(any.val)
if any.val > 0 {
return uint32(any.val)
}
return 0
}
func (any *floatAny) ToUint64() uint64 {
return uint64(any.val)
if any.val > 0 {
return uint64(any.val)
}
return 0
}
func (any *floatAny) ToFloat32() float32 {