Skip to content

Commit d17f6c1

Browse files
authored
Merge pull request #708 from hyphacoop/negative-zero
Use actual negative zero in tests
2 parents 1bc46d8 + 7cbcb2a commit d17f6c1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

decode_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2085,8 +2085,8 @@ var unmarshalFloatTests = []unmarshalFloatTest{
20852085
},
20862086
{
20872087
data: mustHexDecode("f98000"),
2088-
wantInterfaceValue: float64(-0.0), //nolint:staticcheck // we know -0.0 is 0.0 in Go
2089-
wantValues: []any{float32(-0.0), float64(-0.0)}, //nolint:staticcheck // we know -0.0 is 0.0 in Go
2088+
wantInterfaceValue: math.Copysign(0, -1),
2089+
wantValues: []any{float32(math.Copysign(0, -1)), math.Copysign(0, -1)},
20902090
},
20912091
{
20922092
data: mustHexDecode("f93c00"),

0 commit comments

Comments
 (0)