summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--internal/borrowed_tags.go2
4 files changed, 13 insertions, 13 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
diff --git a/internal/borrowed_tags.go b/internal/borrowed_tags.go
index e2bb54a..6bbb36d 100644
--- a/internal/borrowed_tags.go
+++ b/internal/borrowed_tags.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package internal // MODIFIED
+package internal // MODIFIED: changed package name
import (
"strings"