~ubuntu-branches/ubuntu/saucy/golang/saucy

« back to all changes in this revision

Viewing changes to src/pkg/crypto/rsa/pkcs1v15_test.go

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-07-08 05:52:37 UTC
  • mfrom: (29.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130708055237-at01839e0hp8z3ni
Tags: 2:1.1-1ubuntu1
016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
                        t.Errorf("#%d error decrypting", i)
58
58
                }
59
59
                want := []byte(test.out)
60
 
                if bytes.Compare(out, want) != 0 {
 
60
                if !bytes.Equal(out, want) {
61
61
                        t.Errorf("#%d got:%#v want:%#v", i, out, want)
62
62
                }
63
63
        }
90
90
                        return false
91
91
                }
92
92
 
93
 
                if bytes.Compare(plaintext, in) != 0 {
 
93
                if !bytes.Equal(plaintext, in) {
94
94
                        t.Errorf("output mismatch: %#v %#v", plaintext, in)
95
95
                        return false
96
96
                }
132
132
                        t.Errorf("#%d error decrypting", i)
133
133
                }
134
134
                want := []byte(test.out)
135
 
                if bytes.Compare(key, want) != 0 {
 
135
                if !bytes.Equal(key, want) {
136
136
                        t.Errorf("#%d got:%#v want:%#v", i, key, want)
137
137
                }
138
138
        }
176
176
                }
177
177
 
178
178
                expected, _ := hex.DecodeString(test.out)
179
 
                if bytes.Compare(s, expected) != 0 {
 
179
                if !bytes.Equal(s, expected) {
180
180
                        t.Errorf("#%d got: %x want: %x", i, s, expected)
181
181
                }
182
182
        }