From 5f4b16c00f2475a8efd0ae0d4d4e26f92b563dc0 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 25 Sep 2016 19:48:21 +0200 Subject: Implement changes proposed by gosimple. Also delete the unused "dirIVNameStruct", found by deadcode. --- internal/stupidgcm/stupidgcm_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/stupidgcm/stupidgcm_test.go') diff --git a/internal/stupidgcm/stupidgcm_test.go b/internal/stupidgcm/stupidgcm_test.go index 82516b3..b0e25ab 100644 --- a/internal/stupidgcm/stupidgcm_test.go +++ b/internal/stupidgcm/stupidgcm_test.go @@ -52,7 +52,7 @@ func TestEncryptDecrypt(t *testing.T) { gOut := gGCM.Seal(dst, iv, in, authData) // Ciphertext must be identical to Go GCM - if bytes.Compare(sOut, gOut) != 0 { + if !bytes.Equal(sOut, gOut) { t.Fatalf("Compare failed for encryption, size %d", i) t.Log("sOut:") t.Log("\n" + hex.Dump(sOut)) @@ -70,7 +70,7 @@ func TestEncryptDecrypt(t *testing.T) { } // Plaintext must be identical to Go GCM - if bytes.Compare(sOut2, gOut2) != 0 { + if !bytes.Equal(sOut2, gOut2) { t.Fatalf("Compare failed for decryption, size %d", i) } } @@ -90,7 +90,7 @@ func TestCorruption(t *testing.T) { if sErr != nil { t.Fatal(sErr) } - if bytes.Compare(in, sOut2) != 0 { + if !bytes.Equal(in, sOut2) { t.Fatalf("Compare failed") } -- cgit v1.2.3