mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-28 00:27:26 +00:00
added test for CopyBytes
This commit is contained in:
parent
ada684e054
commit
834f8a1dc8
1 changed files with 9 additions and 0 deletions
|
|
@ -134,3 +134,12 @@ func TestBinaryLength(t *testing.T) {
|
|||
t.Errorf("Expected %d got %d", exp2, res2)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCopyBytes(t *testing.T) {
|
||||
data1 := []byte{1, 2, 3, 4}
|
||||
exp1 := []byte{1, 2, 3, 4}
|
||||
res1 := CopyBytes(data1)
|
||||
if bytes.Compare(res1, exp1) != 0 {
|
||||
t.Errorf("Expected % x got % x", exp1, res1)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue