Commit 834f8a1d authored by Taylor Gerring's avatar Taylor Gerring

added test for CopyBytes

parent ada684e0
......@@ -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)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment