aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/rlp_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethutil/rlp_test.go')
-rw-r--r--ethutil/rlp_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/ethutil/rlp_test.go b/ethutil/rlp_test.go
index 095c01ecc..90057ab42 100644
--- a/ethutil/rlp_test.go
+++ b/ethutil/rlp_test.go
@@ -44,6 +44,17 @@ func TestValueSlice(t *testing.T) {
}
}
+func TestLargeData(t *testing.T) {
+ data := make([]byte, 100000)
+ enc := Encode(data)
+ value := NewValue(enc)
+ value.Decode()
+
+ if value.Len() != len(data) {
+ t.Error("Expected data to be", len(data), "got", value.Len())
+ }
+}
+
func TestValue(t *testing.T) {
value := NewValueFromBytes([]byte("\xcd\x83dog\x83god\x83cat\x01"))
if value.Get(0).Str() != "dog" {