Closed kevburnsjr closed 4 years ago
Fixes bug in test helper to expose 5 failing tests
$ go test --- FAIL: TestArrayDiff (0.00s) common_test.go:120: [1 2 3].Diff([1 {} 3]) = @ [1] - 2 + {} . Want @ [1] - 2 + null . --- FAIL: TestNullDiff (0.00s) common_test.go:120: {}.Diff({}) = @ [] - {} . Want @ [] - null . common_test.go:120: {}.Diff({}) = @ [] + {} . Want @ [] + null . --- FAIL: TestObjectDiff (0.00s) common_test.go:120: {map[a:1] map[]}.Diff({map[a:{}] map[]}) = @ ["a"] - 1 + {} . Want @ ["a"] - 1 + null . --- FAIL: TestStringDiff (0.00s) common_test.go:120: {}.Diff(abc) = @ [] - {} + "abc" . Want @ [] - null + "abc" . FAIL exit status 1 FAIL github.com/josephburnett/jd/lib 0.026s
Changes jsonNull into a type that marshals cleanly to null
null
-type jsonNull struct{} +type jsonNull []byte
Thanks for the pull request!
See https://github.com/josephburnett/jd/issues/20
Fixes bug in test helper to expose 5 failing tests
Changes jsonNull into a type that marshals cleanly to
null