aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/rlp_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-30 05:31:33 +0800
committerobscuren <geffobscura@gmail.com>2014-07-30 05:31:33 +0800
commit6e94c024e476a0e96b81d1cdd60dbb88b723593a (patch)
treec6c604d56dd6c92d45a2ce808e492c47582bc56f /ethutil/rlp_test.go
parentd1d2b660dcc3c7539940a5e3d5a48ad10487bd8f (diff)
downloaddexon-6e94c024e476a0e96b81d1cdd60dbb88b723593a.tar.gz
dexon-6e94c024e476a0e96b81d1cdd60dbb88b723593a.tar.zst
dexon-6e94c024e476a0e96b81d1cdd60dbb88b723593a.zip
Added big data test and updating to reader
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" {