diff options
Diffstat (limited to 'rlp/decode_test.go')
-rw-r--r-- | rlp/decode_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rlp/decode_test.go b/rlp/decode_test.go index 2d465b74d..d762e195d 100644 --- a/rlp/decode_test.go +++ b/rlp/decode_test.go @@ -339,6 +339,12 @@ var ( ) ) +type hasIgnoredField struct { + A uint + B uint `rlp:"-"` + C uint +} + var decodeTests = []decodeTest{ // booleans {input: "01", ptr: new(bool), value: true}, @@ -490,6 +496,13 @@ var decodeTests = []decodeTest{ value: tailRaw{A: 1, Tail: []RawValue{}}, }, + // struct tag "-" + { + input: "C20102", + ptr: new(hasIgnoredField), + value: hasIgnoredField{A: 1, C: 2}, + }, + // RawValue {input: "01", ptr: new(RawValue), value: RawValue(unhex("01"))}, {input: "82FFFF", ptr: new(RawValue), value: RawValue(unhex("82FFFF"))}, |