diff options
author | Felix Lange <fjl@twurst.com> | 2015-12-22 04:05:20 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-02-19 18:14:29 +0800 |
commit | bb07ce3eedabb2133227ba1d7569d171d8e5b25c (patch) | |
tree | 9e5b8ff9506f39ca1b94a21833b96646ccb7a19b /rlp/encode_test.go | |
parent | fdb936ee95d09b1b98418735a813deba6770ad5a (diff) | |
download | go-tangerine-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.tar go-tangerine-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.tar.gz go-tangerine-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.tar.bz2 go-tangerine-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.tar.lz go-tangerine-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.tar.xz go-tangerine-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.tar.zst go-tangerine-bb07ce3eedabb2133227ba1d7569d171d8e5b25c.zip |
rlp: add "tail" struct tag
Diffstat (limited to 'rlp/encode_test.go')
-rw-r--r-- | rlp/encode_test.go | 4 |
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"}, |