1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
12 func TestXOR(t
*testing
.T
) {
13 for alignP
:= 0; alignP
< 2; alignP
++ {
14 for alignQ
:= 0; alignQ
< 2; alignQ
++ {
15 for alignD
:= 0; alignD
< 2; alignD
++ {
16 p
:= make([]byte, 1024)[alignP
:]
17 q
:= make([]byte, 1024)[alignQ
:]
18 d1
:= make([]byte, 1024+alignD
)[alignD
:]
19 d2
:= make([]byte, 1024+alignD
)[alignD
:]
21 safeXORBytes(d2
, p
, q
)
22 if bytes
.Compare(d1
, d2
) != 0 {