File: json.result

package info (click to toggle)
tarantool 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 85,364 kB
  • sloc: ansic: 513,760; cpp: 69,489; sh: 25,650; python: 19,190; perl: 14,973; makefile: 4,173; yacc: 1,329; sql: 1,074; pascal: 620; ruby: 190; awk: 18; lisp: 7
file content (208 lines) | stat: -rw-r--r-- 8,239 bytes parent folder | download | duplicates (3)
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
	*** main ***
1..6
	*** test_basic ***
    1..71
    ok 1 - parse <[1]>
    ok 2 - <[1]> is num
    ok 3 - <[1]> is 0
    ok 4 - parse <field1>
    ok 5 - <field1> is str
    ok 6 - len is 6
    ok 7 - str is field1
    ok 8 - parse <field2>
    ok 9 - <field2> is str
    ok 10 - len is 6
    ok 11 - str is field2
    ok 12 - parse <field3>
    ok 13 - <field3> is str
    ok 14 - len is 6
    ok 15 - str is field3
    ok 16 - parse <[5]>
    ok 17 - <[5]> is num
    ok 18 - <[5]> is 4
    ok 19 - parse <[3]>
    ok 20 - <[3]> is num
    ok 21 - <[3]> is 2
    ok 22 - parse <field>
    ok 23 - <field> is str
    ok 24 - len is 5
    ok 25 - str is field
    ok 26 - parse <[2]>
    ok 27 - <[2]> is num
    ok 28 - <[2]> is 1
    ok 29 - parse <field>
    ok 30 - <field> is str
    ok 31 - len is 5
    ok 32 - str is field
    ok 33 - parse <f1>
    ok 34 - <f1> is str
    ok 35 - len is 2
    ok 36 - str is f1
    ok 37 - parse <f2'3'>
    ok 38 - <f2'3'> is str
    ok 39 - len is 5
    ok 40 - str is f2'3'
    ok 41 - parse <field1>
    ok 42 - <field1> is str
    ok 43 - len is 6
    ok 44 - str is field1
    ok 45 - parse <field1>
    ok 46 - <field1> is str
    ok 47 - len is 6
    ok 48 - str is field1
    ok 49 - parse <[1234]>
    ok 50 - <[1234]> is num
    ok 51 - <[1234]> is 1233
    ok 52 - parse empty path
    ok 53 - is str
    ok 54 - parse <field1>
    ok 55 - <field1> is str
    ok 56 - len is 6
    ok 57 - str is field1
    ok 58 - parse <[2]>
    ok 59 - <[2]> is num
    ok 60 - <[2]> is 1
    ok 61 - parse <[6]>
    ok 62 - <[6]> is num
    ok 63 - <[6]> is 5
    ok 64 - parse <привет中国world>
    ok 65 - <привет中国world> is str
    ok 66 - len is 23
    ok 67 - str is привет中国world
    ok 68 - parse <中国a>
    ok 69 - <中国a> is str
    ok 70 - len is 7
    ok 71 - str is 中国a
ok 1 - subtests
	*** test_basic: done ***
	*** test_errors ***
    1..22
    ok 1 - error on position 2 for <[[>
    ok 2 - error on position 2 for <[field]>
    ok 3 - error on position 1 for <'field1'.field2>
    ok 4 - error on position 2 for <[]>
    ok 5 - error on position 1 for <''>
    ok 6 - error on position 1 for < field1>
    ok 7 - error on position 1 for <1field>
    ok 8 - error on position 2 for <.1field>
    ok 9 - error on position 8 for <['field>
    ok 10 - error on position 9 for <['field'>
    ok 11 - error on position 5 for <[123>
    ok 12 - error on position 3 for <['']>
    ok 13 - error on position 2 for <.[123]>
    ok 14 - error on position 2 for <[.]>
    ok 15 - error on position 6 for <['aaa']>
    ok 16 - error on position 2 for <.>
    ok 17 - can not write <field.[index]>
    ok 18 - can not omit '.' before not a first key out of []
    ok 19 - error in leading <.>
    ok 20 - space inside identifier
    ok 21 - tab inside identifier
    ok 22 - invalid token for index_base 1
ok 2 - subtests
	*** test_errors: done ***
	*** test_tree ***
    1..65
    ok 1 - add path '[1][10]'
    ok 2 - add path '[1][20].file'
    ok 3 - add path '[1][20].file[2]'
    ok 4 - add path '[1][20].file[8]'
    ok 5 - add path '[1][20]["file"][8]'
    ok 6 - lookup path '[1][10]'
    ok 7 - lookup path '[1][20].file'
    ok 8 - lookup unregistered path '[1][3]'
    ok 9 - test foreach pre order 0: have 0 expected of 0
    ok 10 - test foreach pre order 1: have 1 expected of 1
    ok 11 - test foreach pre order 2: have 2 expected of 2
    ok 12 - test foreach pre order 3: have 3 expected of 3
    ok 13 - test foreach pre order 4: have 4 expected of 4
    ok 14 - test foreach pre order 5: have 5 expected of 5
    ok 15 - records iterated count 6 of 6
    ok 16 - test foreach post order 0: have 1 expected of 1
    ok 17 - test foreach post order 1: have 4 expected of 4
    ok 18 - test foreach post order 2: have 5 expected of 5
    ok 19 - test foreach post order 3: have 3 expected of 3
    ok 20 - test foreach post order 4: have 2 expected of 2
    ok 21 - test foreach post order 5: have 0 expected of 0
    ok 22 - records iterated count 6 of 6
    ok 23 - test foreach safe order 0: have 1 expected of 1
    ok 24 - test foreach safe order 1: have 4 expected of 4
    ok 25 - test foreach safe order 2: have 5 expected of 5
    ok 26 - test foreach safe order 3: have 3 expected of 3
    ok 27 - test foreach safe order 4: have 2 expected of 2
    ok 28 - test foreach safe order 5: have 0 expected of 0
    ok 29 - records iterated count 6 of 6
    ok 30 - test foreach entry pre order 0: have 0 expected of 0
    ok 31 - test foreach entry pre order 1: have 1 expected of 1
    ok 32 - test foreach entry pre order 2: have 2 expected of 2
    ok 33 - test foreach entry pre order 3: have 3 expected of 3
    ok 34 - test foreach entry pre order 4: have 4 expected of 4
    ok 35 - test foreach entry pre order 5: have 5 expected of 5
    ok 36 - records iterated count 6 of 6
    ok 37 - test foreach entry post order 0: have 1 expected of 1
    ok 38 - test foreach entry post order 1: have 4 expected of 4
    ok 39 - test foreach entry post order 2: have 5 expected of 5
    ok 40 - test foreach entry post order 3: have 3 expected of 3
    ok 41 - test foreach entry post order 4: have 2 expected of 2
    ok 42 - test foreach entry post order 5: have 0 expected of 0
    ok 43 - records iterated count 6 of 6
    ok 44 - max_child_index 7 expected of 7
    ok 45 - max_child_index 1 expected of 1
    ok 46 - max_child_index -1 expected of -1
    ok 47 - lookup removed path '[1][20].file[2]'
    ok 48 - lookup removed path '[1][20].file[8]'
    ok 49 - lookup path was not corrupted '[1][20].file'
    ok 50 - test foreach entry safe order 0: have 1 expected of 1
    ok 51 - test foreach entry safe order 1: have 3 expected of 3
    ok 52 - test foreach entry safe order 2: have 2 expected of 2
    ok 53 - test foreach entry safe order 3: have 0 expected of 0
    ok 54 - records iterated count 4 of 4
    ok 55 - interm node is not leaf
    ok 56 - last node is leaf
    ok 57 - last node became interm - it can't be leaf anymore
    ok 58 - last node is leaf
    ok 59 - add path '[1][10]'
    ok 60 - lookup any token in non-multikey node
    ok 61 - add path '[1][*]["data"]'
    ok 62 - lookup path '[1][*]["data"]'
    ok 63 - lookup numeric token in multikey node
    ok 64 - lookup any token in multikey node
    ok 65 - lookup string token in multikey node
ok 3 - subtests
	*** test_tree: done ***
	*** test_path_cmp ***
    1..8
    ok 1 - path cmp result "Data[1]["FIO"].fname" with "Data[1]["FIO"].fname": have 0, expected 0
    ok 2 - path cmp result "Data[1]["FIO"].fname" with "["Data"][1].FIO["fname"]": have 0, expected 0
    ok 3 - path cmp result "Data[1]["FIO"].fname" with "Data[1]": have 1, expected 1
    ok 4 - path cmp result "Data[1]["FIO"].fname" with "Data[1]["FIO"].fname[1]": have -1, expected -1
    ok 5 - path cmp result "Data[1]["FIO"].fname" with "Data[1]["Info"].fname[1]": have -1, expected -1
    ok 6 - path cmp result "Data[*]["FIO"].fname[*]" with "["Data"][*].FIO["fname"][*]": have 0, expected 0
    ok 7 - path Data[1]["FIO"].fname is valid
    ok 8 - path Data[[1]["FIO"].fname error pos 6 expected 6
ok 4 - subtests
	*** test_path_cmp: done ***
	*** test_path_snprint ***
    1..9
    ok 1 - full path - retval
    ok 2 - full path - terminating nul
    ok 3 - full path - output
    ok 4 - truncated path - retval
    ok 5 - truncated path - terminating nul
    ok 6 - truncated path - output
    ok 7 - 1-byte buffer - retval
    ok 8 - 1-byte buffer - terminating nul
    ok 9 - 0-byte buffer - retval
ok 5 - subtests
	*** test_path_snprint: done ***
	*** test_path_multikey ***
    1..6
    ok 1 - Test json_path_multikey_offset with : have 0 expected 0
    ok 2 - Test json_path_multikey_offset with [1].Data[1].extra[1]: have 20 expected 20
    ok 3 - Test json_path_multikey_offset with [*].Data[1].extra[1]: have 0 expected 0
    ok 4 - Test json_path_multikey_offset with [*].Data[*].extra[1]: have 0 expected 0
    ok 5 - Test json_path_multikey_offset with [1].Data[*].extra[1]: have 8 expected 8
    ok 6 - Test json_path_multikey_offset with [1].Data[1].extra[*]: have 17 expected 17
ok 6 - subtests
	*** test_path_multikey: done ***
	*** main: done ***