summaryrefslogtreecommitdiff
path: root/compat/json
diff options
context:
space:
mode:
Diffstat (limited to 'compat/json')
-rw-r--r--compat/json/borrowed_decode_test.go16
-rw-r--r--compat/json/borrowed_encode_test.go4
-rw-r--r--compat/json/borrowed_fuzz_test.go4
3 files changed, 12 insertions, 12 deletions
diff --git a/compat/json/borrowed_decode_test.go b/compat/json/borrowed_decode_test.go
index 4b9d0cb..ccee264 100644
--- a/compat/json/borrowed_decode_test.go
+++ b/compat/json/borrowed_decode_test.go
@@ -1139,9 +1139,9 @@ func TestUnmarshal(t *testing.T) {
if !reflect.DeepEqual(v.Elem().Interface(), tt.out) {
t.Errorf("#%d: mismatch\nhave: %#+v\nwant: %#+v", i, v.Elem().Interface(), tt.out)
data, _ := Marshal(v.Elem().Interface())
- t.Log(string(data)) // MODIFIED
+ t.Log(string(data)) // MODIFIED: use the test logger
data, _ = Marshal(tt.out)
- t.Log(string(data)) // MODIFIED
+ t.Log(string(data)) // MODIFIED: use the test logger
continue
}
@@ -1957,9 +1957,9 @@ func TestByteKind(t *testing.T) {
if err != nil {
t.Error(err)
}
- if !reflect.DeepEqual(data, []byte(`"aGVsbG8="`)) { // MODIFIED
- t.Errorf("expected %q == %q", data, `"aGVsbG8="`) // MODIFIED
- } // MODIFIED
+ if !reflect.DeepEqual(data, []byte(`"aGVsbG8="`)) { // MODIFIED: added
+ t.Errorf("expected %q == %q", data, `"aGVsbG8="`) // MODIFIED: added
+ } // MODIFIED: added
var b byteKind
err = Unmarshal(data, &b)
if err != nil {
@@ -1981,9 +1981,9 @@ func TestSliceOfCustomByte(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- if !reflect.DeepEqual(data, []byte(`"aGVsbG8="`)) { // MODIFIED
- t.Errorf("expected %q == %q", data, `"aGVsbG8="`) // MODIFIED
- } // MODIFIED
+ if !reflect.DeepEqual(data, []byte(`"aGVsbG8="`)) { // MODIFIED: added
+ t.Errorf("expected %q == %q", data, `"aGVsbG8="`) // MODIFIED: added
+ } // MODIFIED: added
var b []Uint8
err = Unmarshal(data, &b)
if err != nil {
diff --git a/compat/json/borrowed_encode_test.go b/compat/json/borrowed_encode_test.go
index 11c2db4..c193e1c 100644
--- a/compat/json/borrowed_encode_test.go
+++ b/compat/json/borrowed_encode_test.go
@@ -25,7 +25,7 @@ type Optionals struct {
Ir int `json:"omitempty"` // actually named omitempty, not an option
Io int `json:"io,omitempty"`
- Slr []string `json:"slr,random"` //nolint:staticcheck // testing handling of unknown options // MODIFIED
+ Slr []string `json:"slr,random"` //nolint:staticcheck // testing handling of unknown options // MODIFIED: added nolint annotation
Slo []string `json:"slo,omitempty"`
Mr map[string]any `json:"mr"`
@@ -1156,7 +1156,7 @@ func TestMarshalPanic(t *testing.T) {
t.Errorf("panic() = (%T)(%v), want 0xdead", got, got)
}
}()
- _, _ = Marshal(&marshalPanic{}) // MODIFIED
+ _, _ = Marshal(&marshalPanic{}) // MODIFIED: added _, _ dogsled for the linter
t.Error("Marshal should have panicked")
}
diff --git a/compat/json/borrowed_fuzz_test.go b/compat/json/borrowed_fuzz_test.go
index 82e6ada..8490af6 100644
--- a/compat/json/borrowed_fuzz_test.go
+++ b/compat/json/borrowed_fuzz_test.go
@@ -48,7 +48,7 @@ func FuzzUnmarshalJSON(f *testing.F) {
})
}
-/* // MODIFIED
+/* // MODIFIED: we don't do tokens
func FuzzDecoderToken(f *testing.F) {
f.Add([]byte(`{
"object": {
@@ -80,4 +80,4 @@ func FuzzDecoderToken(f *testing.F) {
}
})
}
-*/ // MODIFIED
+*/ // MODIFIED: we don't do tokens