Skip to content

Commit

Permalink
Patch go-json-experiment/json@c2a874a so tests pass on later versions…
Browse files Browse the repository at this point in the history
… of go
  • Loading branch information
Jefftree committed Aug 16, 2024
1 parent 91dab69 commit 9382876
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ func TestMarshal(t *testing.T) {
Bytes: []byte{}, // not omitted since allocated slice is non-zero
Int: 1, // not omitted since 1 is non-zero
Uint: 1, // not omitted since 1 is non-zero
Float: math.Copysign(0, -1), // not omitted since -0 is technically non-zero
Float: math.SmallestNonzeroFloat64, // not omitted since still slightly above zero
Map: map[string]string{}, // not omitted since allocated map is non-zero
StructScalars: structScalars{unexported: true}, // not omitted since unexported is non-zero
StructSlices: structSlices{Ignored: true}, // not omitted since Ignored is non-zero
Expand All @@ -1367,7 +1367,7 @@ func TestMarshal(t *testing.T) {
"Bytes": "",
"Int": 1,
"Uint": 1,
"Float": -0,
"Float": 5e-324,
"Map": {},
"StructScalars": {
"Bool": false,
Expand Down Expand Up @@ -1571,7 +1571,7 @@ func TestMarshal(t *testing.T) {
PointerSlice: addr([]string{""}),
PointerSliceEmpty: addr(sliceMarshalEmpty{"value"}),
PointerSliceNonEmpty: addr(sliceMarshalNonEmpty{"value"}),
Pointer: &structOmitZeroEmptyAll{Float: math.Copysign(0, -1)},
Pointer: &structOmitZeroEmptyAll{Float: math.SmallestNonzeroFloat64},
Interface: []string{""},
},
want: `{
Expand Down Expand Up @@ -1616,7 +1616,7 @@ func TestMarshal(t *testing.T) {
"value"
],
"Pointer": {
"Float": -0
"Float": 5e-324
},
"Interface": [
""
Expand Down

0 comments on commit 9382876

Please sign in to comment.