Skip to content
Snippets Groups Projects
Commit 61fe4b5a authored by ko_oler's avatar ko_oler
Browse files

правки по ПР

parent 61943d0f
No related branches found
No related tags found
No related merge requests found
......@@ -10,8 +10,8 @@ import (
const (
NumberFormatInt = "int"
NumberFormatFloat = "float"
maxInt = 1<<53 - 1 // Integers from −9,007,199,254,740,992 to 9,007,199,254,740,992 can be exactly represented in float64.
minInt = -1<<53 + 1 // Integers from −9,007,199,254,740,992 to 9,007,199,254,740,992 can be exactly represented in float64.
maxInt = 1<<53 - 1 // Integers from −9,007,199,254,740,991 to 9,007,199,254,740,991 can be exactly represented in float64.
minInt = -1<<53 + 1
)
var numberType = &NumberType{}
......
......@@ -25,8 +25,7 @@ func TestNumberField_Decode(t *testing.T) {
{"maxInt in float", Number(NumberFormatInt), float64(maxInt), int64(maxInt), false}, // #8
{"minInt in float", Number(NumberFormatInt), float64(minInt), int64(minInt), false}, // #9
{"Convert error", Number(NumberFormatInt), math.MaxFloat64, nil, true}, // #10
{"Convert error", Number(NumberFormatInt), -9223372036854776000.0, nil, true}, // #11
{"Convert error", Number(NumberFormatInt), 9223372036854776000.0, nil, true}, // #12
{"Convert error", Number(NumberFormatInt), -math.MaxFloat64, nil, true}, // #11
{"Convert error", Number(NumberFormatInt), float64(math.MaxInt64), nil, true}, // #13
{"Convert error", Number(NumberFormatInt), float64(math.MinInt64), nil, true}, // #14
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment