test uint builtin typecheck overflow values for []byte
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Adrien Marquès 2020-03-01 21:43:28 +01:00
parent 53eaec0c50
commit 503f01bddd
Signed by: xdrm-brackets
GPG Key ID: D75243CA236D825E
1 changed files with 5 additions and 0 deletions

View File

@ -96,6 +96,11 @@ func TestUint_Values(t *testing.T) {
// strane offset because of how precision works // strane offset because of how precision works
{fmt.Sprintf("%f", float64(math.MaxUint64+1024*3)), false}, {fmt.Sprintf("%f", float64(math.MaxUint64+1024*3)), false},
{[]byte(fmt.Sprintf("%d", math.MaxInt64)), true},
{[]byte(fmt.Sprintf("%d", uint(math.MaxUint64))), true},
// strane offset because of how precision works
{[]byte(fmt.Sprintf("%f", float64(math.MaxUint64+1024*3))), false},
{"string", false}, {"string", false},
{[]byte("bytes"), false}, {[]byte("bytes"), false},
{-0.1, false}, {-0.1, false},