Skip to content

Commit 7cbcb2a

Browse files
committed
use actual negative zero
Signed-off-by: Cole Anthony Capilongo cole@hypha.coop
1 parent 1bc46d8 commit 7cbcb2a

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)