summaryrefslogtreecommitdiff
path: root/tests/test_cast.expected
blob: 6a19de9a865ca74d7eb4593095b681f781356399 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
Parsed input: {
		"string_of_digits": "123",
		"regular_number": 222,
		"decimal_number": 99.55,
		"boolean_true": true,
		"boolean_false": false,
		"int64_number": 2147483649,
		"negative_number": -321321321,
		"a_null": null,
		"empty_array": [],
		"nonempty_array": [ 123 ],
		"array_with_zero": [ 0 ],
		"empty_object": {},
		"nonempty_object": { "a": 123 },
	}
Result is not NULL
new_obj.string_of_digits json_object_get_type()=string
new_obj.string_of_digits json_object_get_int()=123
new_obj.string_of_digits json_object_get_int64()=123
new_obj.string_of_digits json_object_get_uint64()=123
new_obj.string_of_digits json_object_get_boolean()=1
new_obj.string_of_digits json_object_get_double()=123.000000
new_obj.regular_number json_object_get_type()=int
new_obj.regular_number json_object_get_int()=222
new_obj.regular_number json_object_get_int64()=222
new_obj.regular_number json_object_get_uint64()=222
new_obj.regular_number json_object_get_boolean()=1
new_obj.regular_number json_object_get_double()=222.000000
new_obj.decimal_number json_object_get_type()=double
new_obj.decimal_number json_object_get_int()=99
new_obj.decimal_number json_object_get_int64()=99
new_obj.decimal_number json_object_get_uint64()=99
new_obj.decimal_number json_object_get_boolean()=1
new_obj.decimal_number json_object_get_double()=99.550000
new_obj.boolean_true json_object_get_type()=boolean
new_obj.boolean_true json_object_get_int()=1
new_obj.boolean_true json_object_get_int64()=1
new_obj.boolean_true json_object_get_uint64()=1
new_obj.boolean_true json_object_get_boolean()=1
new_obj.boolean_true json_object_get_double()=1.000000
new_obj.boolean_false json_object_get_type()=boolean
new_obj.boolean_false json_object_get_int()=0
new_obj.boolean_false json_object_get_int64()=0
new_obj.boolean_false json_object_get_uint64()=0
new_obj.boolean_false json_object_get_boolean()=0
new_obj.boolean_false json_object_get_double()=0.000000
new_obj.int64_number json_object_get_type()=int
new_obj.int64_number json_object_get_int()=2147483647
new_obj.int64_number json_object_get_int64()=2147483649
new_obj.int64_number json_object_get_uint64()=2147483649
new_obj.int64_number json_object_get_boolean()=1
new_obj.int64_number json_object_get_double()=2147483649.000000
new_obj.negative_number json_object_get_type()=int
new_obj.negative_number json_object_get_int()=-321321321
new_obj.negative_number json_object_get_int64()=-321321321
new_obj.negative_number json_object_get_uint64()=0
new_obj.negative_number json_object_get_boolean()=1
new_obj.negative_number json_object_get_double()=-321321321.000000
new_obj.a_null json_object_get_type()=null
new_obj.a_null json_object_get_int()=0
new_obj.a_null json_object_get_int64()=0
new_obj.a_null json_object_get_uint64()=0
new_obj.a_null json_object_get_boolean()=0
new_obj.a_null json_object_get_double()=0.000000
new_obj.empty_array json_object_get_type()=array
new_obj.empty_array json_object_get_int()=0
new_obj.empty_array json_object_get_int64()=0
new_obj.empty_array json_object_get_uint64()=0
new_obj.empty_array json_object_get_boolean()=0
new_obj.empty_array json_object_get_double()=0.000000
new_obj.nonempty_array json_object_get_type()=array
new_obj.nonempty_array json_object_get_int()=0
new_obj.nonempty_array json_object_get_int64()=0
new_obj.nonempty_array json_object_get_uint64()=0
new_obj.nonempty_array json_object_get_boolean()=0
new_obj.nonempty_array json_object_get_double()=0.000000
new_obj.array_with_zero json_object_get_type()=array
new_obj.array_with_zero json_object_get_int()=0
new_obj.array_with_zero json_object_get_int64()=0
new_obj.array_with_zero json_object_get_uint64()=0
new_obj.array_with_zero json_object_get_boolean()=0
new_obj.array_with_zero json_object_get_double()=0.000000
new_obj.empty_object json_object_get_type()=object
new_obj.empty_object json_object_get_int()=0
new_obj.empty_object json_object_get_int64()=0
new_obj.empty_object json_object_get_uint64()=0
new_obj.empty_object json_object_get_boolean()=0
new_obj.empty_object json_object_get_double()=0.000000
new_obj.nonempty_object json_object_get_type()=object
new_obj.nonempty_object json_object_get_int()=0
new_obj.nonempty_object json_object_get_int64()=0
new_obj.nonempty_object json_object_get_uint64()=0
new_obj.nonempty_object json_object_get_boolean()=0
new_obj.nonempty_object json_object_get_double()=0.000000

================================
json_object_is_type: null,boolean,double,int,object,array,string
new_obj                   : 0,0,0,0,1,0,0
new_obj.string_of_digits  : 0,0,0,0,0,0,1
new_obj.regular_number    : 0,0,0,1,0,0,0
new_obj.decimal_number    : 0,0,1,0,0,0,0
new_obj.boolean_true      : 0,1,0,0,0,0,0
new_obj.boolean_false     : 0,1,0,0,0,0,0
new_obj.int64_number      : 0,0,0,1,0,0,0
new_obj.negative_number   : 0,0,0,1,0,0,0
new_obj.a_null            : 1,0,0,0,0,0,0