aboutsummaryrefslogtreecommitdiffstats
path: root/rlp/encode_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-12-22 04:05:20 +0800
committerFelix Lange <fjl@twurst.com>2016-02-19 18:14:29 +0800
commitbb07ce3eedabb2133227ba1d7569d171d8e5b25c (patch)
tree9e5b8ff9506f39ca1b94a21833b96646ccb7a19b /rlp/encode_test.go
parentfdb936ee95d09b1b98418735a813deba6770ad5a (diff)
downloaddexon-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.tar
dexon-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.tar.gz
dexon-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.tar.bz2
dexon-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.tar.lz
dexon-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.tar.xz
dexon-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.tar.zst
dexon-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.zip
rlp: add "tail" struct tag
Diffstat (limited to 'rlp/encode_test.go')
-rw-r--r--rlp/encode_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/rlp/encode_test.go b/rlp/encode_test.go
index a3f30d804..6f38294e4 100644
--- a/rlp/encode_test.go
+++ b/rlp/encode_test.go
@@ -214,6 +214,10 @@ var encTests = []encTest{
{val: simplestruct{A: 3, B: "foo"}, output: "C50383666F6F"},
{val: &recstruct{5, nil}, output: "C205C0"},
{val: &recstruct{5, &recstruct{4, &recstruct{3, nil}}}, output: "C605C404C203C0"},
+ {val: &tailRaw{A: 1, Tail: []RawValue{unhex("02"), unhex("03")}}, output: "C3010203"},
+ {val: &tailRaw{A: 1, Tail: []RawValue{unhex("02")}}, output: "C20102"},
+ {val: &tailRaw{A: 1, Tail: []RawValue{}}, output: "C101"},
+ {val: &tailRaw{A: 1, Tail: nil}, output: "C101"},
// nil
{val: (*uint)(nil), output: "80"},