diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2014-11-06 00:48:23 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2014-11-06 00:48:23 +0800 |
commit | 834f8a1dc8b609199f84dcd59a885e77d8f770ba (patch) | |
tree | e610dd1bc5a97b49319d48b1cbf27e48c848a41a | |
parent | ada684e05458cce26a97b245cd96a8fd72523daa (diff) | |
download | dexon-834f8a1dc8b609199f84dcd59a885e77d8f770ba.tar.gz dexon-834f8a1dc8b609199f84dcd59a885e77d8f770ba.tar.zst dexon-834f8a1dc8b609199f84dcd59a885e77d8f770ba.zip |
added test for CopyBytes
-rw-r--r-- | ethutil/bytes_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ethutil/bytes_test.go b/ethutil/bytes_test.go index 2a106d585..361df4b9d 100644 --- a/ethutil/bytes_test.go +++ b/ethutil/bytes_test.go @@ -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) + } +} |