aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ethutil/bytes_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/ethutil/bytes_test.go b/ethutil/bytes_test.go
index 361df4b9d..82167f054 100644
--- a/ethutil/bytes_test.go
+++ b/ethutil/bytes_test.go
@@ -5,6 +5,17 @@ import (
"testing"
)
+func TestByteString(t *testing.T) {
+ var data Bytes
+ data = []byte{102, 111, 111}
+ exp := "foo"
+ res := data.String()
+
+ if res != exp {
+ t.Errorf("Expected %s got %s", exp, res)
+ }
+}
+
func TestParseDataString(t *testing.T) {
data := ParseData("hello", "world", "0x0106")
exp := "68656c6c6f000000000000000000000000000000000000000000000000000000776f726c640000000000000000000000000000000000000000000000000000000106000000000000000000000000000000000000000000000000000000000000"