Skip to content

Commit 28e231e

Browse files
author
Kevin Wiesmüller
committed
fix remove_test.go after rebase
1 parent 3c6f1ff commit 28e231e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

typed/remove_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,23 +117,23 @@ func TestRemoveShallowRemovesParents(t *testing.T) {
117117
},
118118
}
119119

120-
removeItemsWithSchema(&test, remove, schema, typeRef, false)
120+
test = removeItemsWithSchema(test, remove, schema, typeRef, false)
121121

122122
expect, err := value.FromJSON([]byte(`{"keep": "value", "keepMap": {"child": "value"}, "keepList": [{"child": "value"}], "removeMap": {"child":"value"}, "removeList": [{"child": "value"}]}`))
123123
if err != nil {
124124
t.Fatal(err)
125125
}
126-
if !test.Equals(expect) {
126+
if !value.Equals(test, expect) {
127127
t.Fatalf("unexpected result after remove:\ngot: %v\nexp: %v", test.String(), expect.String())
128128
}
129129

130-
removeItemsWithSchema(&test, remove, schema, typeRef, true)
130+
test = removeItemsWithSchema(test, remove, schema, typeRef, true)
131131

132132
expect, err = value.FromJSON([]byte(`{"keep": "value", "keepMap": {"child": "value"}, "keepList": [{"child": "value"}]}`))
133133
if err != nil {
134134
t.Fatal(err)
135135
}
136-
if !test.Equals(expect) {
137-
t.Fatalf("unexpected result after remove:\ngot: %v\nexp: %v", test.String(), expect.String())
136+
if !value.Equals(test, expect) {
137+
t.Fatalf("unexpected result after remove:\ngot: %v\nexp: %v", value.ToString(test), value.ToString(expect))
138138
}
139139
}

value/value.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func Equals(lhs, rhs Value) bool {
187187
return true
188188
}
189189

190-
// String returns a human-readable representation of the value.
190+
// ToString returns a human-readable representation of the value.
191191
func ToString(v Value) string {
192192
if v.IsNull() {
193193
return "null"

0 commit comments

Comments
 (0)