diff options
author | Luke Shumaker <lukeshu@datawire.io> | 2022-08-14 20:52:06 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@datawire.io> | 2022-08-16 00:05:24 -0600 |
commit | 54bbd1e59317a6e9658eb8098657078cc8e81979 (patch) | |
tree | 0d7033a0644945dedfe0fca158e0c40864f759f6 /compat/json/borrowed_encode_test.go | |
parent | 2ae2ebe2a5ac712db6f9221cb1ad8cfa76aad180 (diff) |
wip: Reduce test differences [ci-skip]
- Handle UTF-16 surrogate pairs
- Handle cycles in values
- Handle cycles in types
- Better errors
- Handle case-folding of struct field names
- Allow []byteTypeWithMethods
- Fix struct field-order
- Fix handling of interfaces storing pointers
- Enforce a maximum decode depth
- Validate struct tags
Diffstat (limited to 'compat/json/borrowed_encode_test.go')
-rw-r--r-- | compat/json/borrowed_encode_test.go | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/compat/json/borrowed_encode_test.go b/compat/json/borrowed_encode_test.go index bb7c9dc..11c2db4 100644 --- a/compat/json/borrowed_encode_test.go +++ b/compat/json/borrowed_encode_test.go @@ -226,11 +226,11 @@ var unsupportedValues = []any{ math.NaN(), math.Inf(-1), math.Inf(1), - //pointerCycle, // MODIFIED - //pointerCycleIndirect, // MODIFIED - //mapCycle, // MODIFIED - //sliceCycle, // MODIFIED - //recursiveSliceCycle, // MODIFIED + pointerCycle, + pointerCycleIndirect, + mapCycle, + sliceCycle, + recursiveSliceCycle, } func TestUnsupportedValues(t *testing.T) { @@ -344,7 +344,6 @@ func (CText) MarshalText() ([]byte, error) { } func TestMarshalerEscaping(t *testing.T) { - t.Skip() // MODIFIED var c C want := `"\u003c\u0026\u003e"` b, err := Marshal(c) @@ -877,7 +876,6 @@ func (f textfloat) MarshalText() ([]byte, error) { return tenc(`TF:%0.2f`, f) } // Issue 13783 func TestEncodeBytekind(t *testing.T) { - t.Skip() // TODO testdata := []struct { data any want string @@ -1139,7 +1137,6 @@ func TestMarshalRawMessageValue(t *testing.T) { if err != nil { t.Errorf("test %d, unexpected failure: %v", i, err) } else { - t.Skip() // MODIFIED t.Errorf("test %d, unexpected success", i) } } @@ -1178,7 +1175,6 @@ func TestMarshalUncommonFieldNames(t *testing.T) { } } -/* // MODIFIED func TestMarshalerError(t *testing.T) { s := "test variable" st := reflect.TypeOf(s) @@ -1205,4 +1201,3 @@ func TestMarshalerError(t *testing.T) { } } } -*/ // MODIFIED |