From bb07ce3eedabb2133227ba1d7569d171d8e5b25c Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 21 Dec 2015 21:05:20 +0100 Subject: rlp: add "tail" struct tag --- rlp/encode_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rlp/encode_test.go') 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"}, -- cgit