summaryrefslogtreecommitdiff
path: root/src/pkg/json/decode_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/json/decode_test.go')
-rw-r--r--src/pkg/json/decode_test.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/pkg/json/decode_test.go b/src/pkg/json/decode_test.go
index a855d6048..5f6c3f5b8 100644
--- a/src/pkg/json/decode_test.go
+++ b/src/pkg/json/decode_test.go
@@ -262,7 +262,10 @@ type All struct {
Float32 float32
Float64 float64
- Foo string `json:"bar"`
+ Foo string `json:"bar"`
+ Foo2 string `json:"bar2,dummyopt"`
+
+ IntStr int64 `json:",string"`
PBool *bool
PInt *int
@@ -331,6 +334,8 @@ var allValue = All{
Float32: 14.1,
Float64: 15.1,
Foo: "foo",
+ Foo2: "foo2",
+ IntStr: 42,
String: "16",
Map: map[string]Small{
"17": {Tag: "tag17"},
@@ -391,6 +396,8 @@ var allValueIndent = `{
"Float32": 14.1,
"Float64": 15.1,
"bar": "foo",
+ "bar2": "foo2",
+ "IntStr": "42",
"PBool": null,
"PInt": null,
"PInt8": null,
@@ -481,6 +488,8 @@ var pallValueIndent = `{
"Float32": 0,
"Float64": 0,
"bar": "",
+ "bar2": "",
+ "IntStr": "0",
"PBool": true,
"PInt": 2,
"PInt8": 3,