aboutsummaryrefslogtreecommitdiffstats
path: root/rlp/decode_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2017-03-22 08:36:22 +0800
committerGitHub <noreply@github.com>2017-03-22 08:36:22 +0800
commit06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462 (patch)
treed764690055f2ee7d880bcce2e413a3665fc1e7e9 /rlp/decode_test.go
parent1dfd65f6d047407585845dfe9be2ff52a8b9f3ab (diff)
parent8cf08e4b25c4cd0e0955598342394f34feecca0c (diff)
downloadgo-tangerine-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.tar
go-tangerine-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.tar.gz
go-tangerine-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.tar.bz2
go-tangerine-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.tar.lz
go-tangerine-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.tar.xz
go-tangerine-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.tar.zst
go-tangerine-06d6685eb58f6cb0eda4d7adc8ae91e5cdb88462.zip
Merge pull request #3756 from fjl/core-types-gencodec
core/types: use gencodec for JSON marshaling code
Diffstat (limited to 'rlp/decode_test.go')
-rw-r--r--rlp/decode_test.go13
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"))},