@@ -24,6 +24,7 @@ type Basic struct {
2424 Vdata interface {}
2525 VjsonInt int
2626 VjsonUint uint
27+ VjsonUint64 uint64
2728 VjsonFloat float64
2829 VjsonNumber json.Number
2930}
@@ -224,6 +225,7 @@ func TestBasicTypes(t *testing.T) {
224225 "vdata" : 42 ,
225226 "vjsonInt" : json .Number ("1234" ),
226227 "vjsonUint" : json .Number ("1234" ),
228+ "vjsonUint64" : json .Number ("9223372036854775809" ), // 2^63 + 1
227229 "vjsonFloat" : json .Number ("1234.5" ),
228230 "vjsonNumber" : json .Number ("1234.5" ),
229231 }
@@ -287,6 +289,10 @@ func TestBasicTypes(t *testing.T) {
287289 t .Errorf ("vjsonuint value should be 1234: %#v" , result .VjsonUint )
288290 }
289291
292+ if result .VjsonUint64 != 9223372036854775809 {
293+ t .Errorf ("vjsonuint64 value should be 9223372036854775809: %#v" , result .VjsonUint64 )
294+ }
295+
290296 if result .VjsonFloat != 1234.5 {
291297 t .Errorf ("vjsonfloat value should be 1234.5: %#v" , result .VjsonFloat )
292298 }
@@ -1721,6 +1727,7 @@ func TestDecodeTable(t *testing.T) {
17211727 "Vdata" : []byte ("data" ),
17221728 "VjsonInt" : 0 ,
17231729 "VjsonUint" : uint (0 ),
1730+ "VjsonUint64" : uint64 (0 ),
17241731 "VjsonFloat" : 0.0 ,
17251732 "VjsonNumber" : json .Number ("" ),
17261733 },
@@ -1762,6 +1769,7 @@ func TestDecodeTable(t *testing.T) {
17621769 "Vdata" : []byte ("data" ),
17631770 "VjsonInt" : 0 ,
17641771 "VjsonUint" : uint (0 ),
1772+ "VjsonUint64" : uint64 (0 ),
17651773 "VjsonFloat" : 0.0 ,
17661774 "VjsonNumber" : json .Number ("" ),
17671775 },
0 commit comments