diff options
| author | Joe Richey joerichey@google.com <joerichey@google.com> | 2018-08-30 03:54:08 -0700 |
|---|---|---|
| committer | Joe Richey joerichey@google.com <joerichey@google.com> | 2018-08-30 03:54:08 -0700 |
| commit | 36b185e408a56d93678f52a59e1d68ece8bf0508 (patch) | |
| tree | aad5ce6733353fe4350a1ae1a312f10b06456dd8 /filesystem | |
| parent | ffbe898d1d42b1cc36def74e86145138fa06c1c3 (diff) | |
Use proto.Equal instead of reflect.DeepEquals
Diffstat (limited to 'filesystem')
| -rw-r--r-- | filesystem/filesystem_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go index 04d5123..2394f68 100644 --- a/filesystem/filesystem_test.go +++ b/filesystem/filesystem_test.go @@ -22,9 +22,9 @@ package filesystem import ( "os" "path/filepath" - "reflect" "testing" + "github.com/golang/protobuf/proto" "github.com/pkg/errors" "github.com/google/fscrypt/crypto" @@ -205,7 +205,7 @@ func TestSetPolicy(t *testing.T) { t.Fatal(err) } - if !reflect.DeepEqual(realPolicy, policy) { + if !proto.Equal(realPolicy, policy) { t.Errorf("policy %+v does not equal expected policy %+v", realPolicy, policy) } @@ -229,7 +229,7 @@ func TestSetProtector(t *testing.T) { t.Fatal(err) } - if !reflect.DeepEqual(realProtector, protector) { + if !proto.Equal(realProtector, protector) { t.Errorf("protector %+v does not equal expected protector %+v", realProtector, protector) } } @@ -289,7 +289,7 @@ func TestLinkedProtector(t *testing.T) { t.Error("mount returned was incorrect") } - if !reflect.DeepEqual(retProtector, protector) { + if !proto.Equal(retProtector, protector) { t.Errorf("protector %+v does not equal expected protector %+v", retProtector, protector) } } |