good morning!!!!

Skip to content
Snippets Groups Projects
Commit b100546c authored by Taylor Gerring's avatar Taylor Gerring
Browse files

add test for Bytes.String()

parent 834f8a1d
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment