Skip to content

Commit

Permalink
chore: use compare vs testutil for proto comparison (#4807)
Browse files Browse the repository at this point in the history
  • Loading branch information
schroederc committed Jan 27, 2021
1 parent 6eaf95d commit bd329db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion kythe/go/storage/stream/BUILD
Expand Up @@ -22,7 +22,6 @@ go_test(
library = "stream",
visibility = ["//visibility:private"],
deps = [
"//kythe/go/test/testutil",
"//kythe/go/util/compare",
],
)
9 changes: 4 additions & 5 deletions kythe/go/storage/stream/stream_test.go
Expand Up @@ -23,7 +23,6 @@ import (
"testing"

"kythe.io/kythe/go/platform/delimited"
"kythe.io/kythe/go/test/testutil"
"kythe.io/kythe/go/util/compare"

"google.golang.org/protobuf/encoding/protojson"
Expand All @@ -38,8 +37,8 @@ func TestReader(t *testing.T) {

var i int
if err := NewReader(r)(func(e *spb.Entry) error {
if err := testutil.DeepEqual(testEntries[i], e); err != nil {
t.Errorf("testEntries[%d]: %v", i, err)
if diff := compare.ProtoDiff(testEntries[i], e); diff != "" {
t.Errorf("testEntries[%d]: %s", i, diff)
}
i++
return nil
Expand All @@ -57,8 +56,8 @@ func TestJSONReader(t *testing.T) {

var i int
if err := NewJSONReader(r)(func(e *spb.Entry) error {
if err := testutil.DeepEqual(testEntries[i], e); err != nil {
t.Errorf("testEntries[%d]: %v", i, err)
if diff := compare.ProtoDiff(testEntries[i], e); diff != "" {
t.Errorf("testEntries[%d]: %s", i, diff)
}
i++
return nil
Expand Down

0 comments on commit bd329db

Please sign in to comment.