summaryrefslogtreecommitdiff
path: root/libgo/go/encoding/json/encode_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/encoding/json/encode_test.go')
-rw-r--r--libgo/go/encoding/json/encode_test.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/libgo/go/encoding/json/encode_test.go b/libgo/go/encoding/json/encode_test.go
index 3fda6a0c719..0f194e13d26 100644
--- a/libgo/go/encoding/json/encode_test.go
+++ b/libgo/go/encoding/json/encode_test.go
@@ -71,14 +71,16 @@ func TestOmitEmpty(t *testing.T) {
}
type StringTag struct {
- BoolStr bool `json:",string"`
- IntStr int64 `json:",string"`
- StrStr string `json:",string"`
+ BoolStr bool `json:",string"`
+ IntStr int64 `json:",string"`
+ UintptrStr uintptr `json:",string"`
+ StrStr string `json:",string"`
}
var stringTagExpected = `{
"BoolStr": "true",
"IntStr": "42",
+ "UintptrStr": "44",
"StrStr": "\"xzbit\""
}`
@@ -86,6 +88,7 @@ func TestStringTag(t *testing.T) {
var s StringTag
s.BoolStr = true
s.IntStr = 42
+ s.UintptrStr = 44
s.StrStr = "xzbit"
got, err := MarshalIndent(&s, "", " ")
if err != nil {
@@ -943,7 +946,7 @@ func TestMarshalRawMessageValue(t *testing.T) {
//
// The tests below marked with Issue6458 used to generate "ImZvbyI=" instead "foo".
// This behavior was intentionally changed in Go 1.8.
- // See https://github.com/golang/go/issues/14493#issuecomment-255857318
+ // See https://golang.org/issues/14493#issuecomment-255857318
{rawText, `"foo"`, true}, // Issue6458
{&rawText, `"foo"`, true},
{[]interface{}{rawText}, `["foo"]`, true}, // Issue6458