Skip to content

Commit

Permalink
use proto.Equal to compare protos
Browse files Browse the repository at this point in the history
  • Loading branch information
jhump committed May 1, 2018
1 parent ae16d78 commit e47c1ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runtime/marshal_proto_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package runtime_test

import (
"bytes"
"reflect"
"testing"

"bytes"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes/timestamp"
"github.com/grpc-ecosystem/grpc-gateway/examples/proto/examplepb"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
Expand Down Expand Up @@ -81,7 +82,7 @@ func TestProtoEncoderDecodert(t *testing.T) {
t.Fatalf("Unmarshalling returned error: %s", err.Error())
}

if !reflect.DeepEqual(unencoded, message) {
if !proto.Equal(unencoded, message) {
t.Errorf(
"Unencoded didn't match original message: (original = %v) != (unencoded = %v)",
unencoded,
Expand Down

0 comments on commit e47c1ee

Please sign in to comment.