authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-04-29 14:04:31-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-04-29 14:04:31-04:00
loge3452ba21b978f8b675e90e3b580e325ae0e38a6
treea06a0b321a8b1d78e41e19af27a25f3e50cb14c6
parentda28811c500c8fdc77468013840f978781e9ef7d
signature Commit is signed but in an unrecognized format.

json tests do not need this prefix anymore


1 files changed, 319 insertions(+), 319 deletions(-)

std/json/test.zig+319-319
......@@ -21,7 +21,7 @@ fn any(comptime s: []const u8) void {
2121//
2222// Additional tests not part of test JSONTestSuite.
2323
24test "json.test.y_trailing_comma_after_empty" {
24test "y_trailing_comma_after_empty" {
2525 ok(
2626 \\{"1":[],"2":{},"3":"4"}
2727 );
......@@ -29,252 +29,252 @@ test "json.test.y_trailing_comma_after_empty" {
2929
3030////////////////////////////////////////////////////////////////////////////////////////////////////
3131
32test "json.test.y_array_arraysWithSpaces" {
32test "y_array_arraysWithSpaces" {
3333 ok(
3434 \\[[] ]
3535 );
3636}
3737
38test "json.test.y_array_empty" {
38test "y_array_empty" {
3939 ok(
4040 \\[]
4141 );
4242}
4343
44test "json.test.y_array_empty-string" {
44test "y_array_empty-string" {
4545 ok(
4646 \\[""]
4747 );
4848}
4949
50test "json.test.y_array_ending_with_newline" {
50test "y_array_ending_with_newline" {
5151 ok(
5252 \\["a"]
5353 );
5454}
5555
56test "json.test.y_array_false" {
56test "y_array_false" {
5757 ok(
5858 \\[false]
5959 );
6060}
6161
62test "json.test.y_array_heterogeneous" {
62test "y_array_heterogeneous" {
6363 ok(
6464 \\[null, 1, "1", {}]
6565 );
6666}
6767
68test "json.test.y_array_null" {
68test "y_array_null" {
6969 ok(
7070 \\[null]
7171 );
7272}
7373
74test "json.test.y_array_with_1_and_newline" {
74test "y_array_with_1_and_newline" {
7575 ok(
7676 \\[1
7777 \\]
7878 );
7979}
8080
81test "json.test.y_array_with_leading_space" {
81test "y_array_with_leading_space" {
8282 ok(
8383 \\ [1]
8484 );
8585}
8686
87test "json.test.y_array_with_several_null" {
87test "y_array_with_several_null" {
8888 ok(
8989 \\[1,null,null,null,2]
9090 );
9191}
9292
93test "json.test.y_array_with_trailing_space" {
93test "y_array_with_trailing_space" {
9494 ok("[2] ");
9595}
9696
97test "json.test.y_number_0e+1" {
97test "y_number_0e+1" {
9898 ok(
9999 \\[0e+1]
100100 );
101101}
102102
103test "json.test.y_number_0e1" {
103test "y_number_0e1" {
104104 ok(
105105 \\[0e1]
106106 );
107107}
108108
109test "json.test.y_number_after_space" {
109test "y_number_after_space" {
110110 ok(
111111 \\[ 4]
112112 );
113113}
114114
115test "json.test.y_number_double_close_to_zero" {
115test "y_number_double_close_to_zero" {
116116 ok(
117117 \\[-0.000000000000000000000000000000000000000000000000000000000000000000000000000001]
118118 );
119119}
120120
121test "json.test.y_number_int_with_exp" {
121test "y_number_int_with_exp" {
122122 ok(
123123 \\[20e1]
124124 );
125125}
126126
127test "json.test.y_number" {
127test "y_number" {
128128 ok(
129129 \\[123e65]
130130 );
131131}
132132
133test "json.test.y_number_minus_zero" {
133test "y_number_minus_zero" {
134134 ok(
135135 \\[-0]
136136 );
137137}
138138
139test "json.test.y_number_negative_int" {
139test "y_number_negative_int" {
140140 ok(
141141 \\[-123]
142142 );
143143}
144144
145test "json.test.y_number_negative_one" {
145test "y_number_negative_one" {
146146 ok(
147147 \\[-1]
148148 );
149149}
150150
151test "json.test.y_number_negative_zero" {
151test "y_number_negative_zero" {
152152 ok(
153153 \\[-0]
154154 );
155155}
156156
157test "json.test.y_number_real_capital_e" {
157test "y_number_real_capital_e" {
158158 ok(
159159 \\[1E22]
160160 );
161161}
162162
163test "json.test.y_number_real_capital_e_neg_exp" {
163test "y_number_real_capital_e_neg_exp" {
164164 ok(
165165 \\[1E-2]
166166 );
167167}
168168
169test "json.test.y_number_real_capital_e_pos_exp" {
169test "y_number_real_capital_e_pos_exp" {
170170 ok(
171171 \\[1E+2]
172172 );
173173}
174174
175test "json.test.y_number_real_exponent" {
175test "y_number_real_exponent" {
176176 ok(
177177 \\[123e45]
178178 );
179179}
180180
181test "json.test.y_number_real_fraction_exponent" {
181test "y_number_real_fraction_exponent" {
182182 ok(
183183 \\[123.456e78]
184184 );
185185}
186186
187test "json.test.y_number_real_neg_exp" {
187test "y_number_real_neg_exp" {
188188 ok(
189189 \\[1e-2]
190190 );
191191}
192192
193test "json.test.y_number_real_pos_exponent" {
193test "y_number_real_pos_exponent" {
194194 ok(
195195 \\[1e+2]
196196 );
197197}
198198
199test "json.test.y_number_simple_int" {
199test "y_number_simple_int" {
200200 ok(
201201 \\[123]
202202 );
203203}
204204
205test "json.test.y_number_simple_real" {
205test "y_number_simple_real" {
206206 ok(
207207 \\[123.456789]
208208 );
209209}
210210
211test "json.test.y_object_basic" {
211test "y_object_basic" {
212212 ok(
213213 \\{"asd":"sdf"}
214214 );
215215}
216216
217test "json.test.y_object_duplicated_key_and_value" {
217test "y_object_duplicated_key_and_value" {
218218 ok(
219219 \\{"a":"b","a":"b"}
220220 );
221221}
222222
223test "json.test.y_object_duplicated_key" {
223test "y_object_duplicated_key" {
224224 ok(
225225 \\{"a":"b","a":"c"}
226226 );
227227}
228228
229test "json.test.y_object_empty" {
229test "y_object_empty" {
230230 ok(
231231 \\{}
232232 );
233233}
234234
235test "json.test.y_object_empty_key" {
235test "y_object_empty_key" {
236236 ok(
237237 \\{"":0}
238238 );
239239}
240240
241test "json.test.y_object_escaped_null_in_key" {
241test "y_object_escaped_null_in_key" {
242242 ok(
243243 \\{"foo\u0000bar": 42}
244244 );
245245}
246246
247test "json.test.y_object_extreme_numbers" {
247test "y_object_extreme_numbers" {
248248 ok(
249249 \\{ "min": -1.0e+28, "max": 1.0e+28 }
250250 );
251251}
252252
253test "json.test.y_object" {
253test "y_object" {
254254 ok(
255255 \\{"asd":"sdf", "dfg":"fgh"}
256256 );
257257}
258258
259test "json.test.y_object_long_strings" {
259test "y_object_long_strings" {
260260 ok(
261261 \\{"x":[{"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}], "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
262262 );
263263}
264264
265test "json.test.y_object_simple" {
265test "y_object_simple" {
266266 ok(
267267 \\{"a":[]}
268268 );
269269}
270270
271test "json.test.y_object_string_unicode" {
271test "y_object_string_unicode" {
272272 ok(
273273 \\{"title":"\u041f\u043e\u043b\u0442\u043e\u0440\u0430 \u0417\u0435\u043c\u043b\u0435\u043a\u043e\u043f\u0430" }
274274 );
275275}
276276
277test "json.test.y_object_with_newlines" {
277test "y_object_with_newlines" {
278278 ok(
279279 \\{
280280 \\"a": "b"
......@@ -282,419 +282,419 @@ test "json.test.y_object_with_newlines" {
282282 );
283283}
284284
285test "json.test.y_string_1_2_3_bytes_UTF-8_sequences" {
285test "y_string_1_2_3_bytes_UTF-8_sequences" {
286286 ok(
287287 \\["\u0060\u012a\u12AB"]
288288 );
289289}
290290
291test "json.test.y_string_accepted_surrogate_pair" {
291test "y_string_accepted_surrogate_pair" {
292292 ok(
293293 \\["\uD801\udc37"]
294294 );
295295}
296296
297test "json.test.y_string_accepted_surrogate_pairs" {
297test "y_string_accepted_surrogate_pairs" {
298298 ok(
299299 \\["\ud83d\ude39\ud83d\udc8d"]
300300 );
301301}
302302
303test "json.test.y_string_allowed_escapes" {
303test "y_string_allowed_escapes" {
304304 ok(
305305 \\["\"\\\/\b\f\n\r\t"]
306306 );
307307}
308308
309test "json.test.y_string_backslash_and_u_escaped_zero" {
309test "y_string_backslash_and_u_escaped_zero" {
310310 ok(
311311 \\["\\u0000"]
312312 );
313313}
314314
315test "json.test.y_string_backslash_doublequotes" {
315test "y_string_backslash_doublequotes" {
316316 ok(
317317 \\["\""]
318318 );
319319}
320320
321test "json.test.y_string_comments" {
321test "y_string_comments" {
322322 ok(
323323 \\["a/*b*/c/*d//e"]
324324 );
325325}
326326
327test "json.test.y_string_double_escape_a" {
327test "y_string_double_escape_a" {
328328 ok(
329329 \\["\\a"]
330330 );
331331}
332332
333test "json.test.y_string_double_escape_n" {
333test "y_string_double_escape_n" {
334334 ok(
335335 \\["\\n"]
336336 );
337337}
338338
339test "json.test.y_string_escaped_control_character" {
339test "y_string_escaped_control_character" {
340340 ok(
341341 \\["\u0012"]
342342 );
343343}
344344
345test "json.test.y_string_escaped_noncharacter" {
345test "y_string_escaped_noncharacter" {
346346 ok(
347347 \\["\uFFFF"]
348348 );
349349}
350350
351test "json.test.y_string_in_array" {
351test "y_string_in_array" {
352352 ok(
353353 \\["asd"]
354354 );
355355}
356356
357test "json.test.y_string_in_array_with_leading_space" {
357test "y_string_in_array_with_leading_space" {
358358 ok(
359359 \\[ "asd"]
360360 );
361361}
362362
363test "json.test.y_string_last_surrogates_1_and_2" {
363test "y_string_last_surrogates_1_and_2" {
364364 ok(
365365 \\["\uDBFF\uDFFF"]
366366 );
367367}
368368
369test "json.test.y_string_nbsp_uescaped" {
369test "y_string_nbsp_uescaped" {
370370 ok(
371371 \\["new\u00A0line"]
372372 );
373373}
374374
375test "json.test.y_string_nonCharacterInUTF-8_U+10FFFF" {
375test "y_string_nonCharacterInUTF-8_U+10FFFF" {
376376 ok(
377377 \\["􏿿"]
378378 );
379379}
380380
381test "json.test.y_string_nonCharacterInUTF-8_U+FFFF" {
381test "y_string_nonCharacterInUTF-8_U+FFFF" {
382382 ok(
383383 \\["￿"]
384384 );
385385}
386386
387test "json.test.y_string_null_escape" {
387test "y_string_null_escape" {
388388 ok(
389389 \\["\u0000"]
390390 );
391391}
392392
393test "json.test.y_string_one-byte-utf-8" {
393test "y_string_one-byte-utf-8" {
394394 ok(
395395 \\["\u002c"]
396396 );
397397}
398398
399test "json.test.y_string_pi" {
399test "y_string_pi" {
400400 ok(
401401 \\["π"]
402402 );
403403}
404404
405test "json.test.y_string_reservedCharacterInUTF-8_U+1BFFF" {
405test "y_string_reservedCharacterInUTF-8_U+1BFFF" {
406406 ok(
407407 \\["𛿿"]
408408 );
409409}
410410
411test "json.test.y_string_simple_ascii" {
411test "y_string_simple_ascii" {
412412 ok(
413413 \\["asd "]
414414 );
415415}
416416
417test "json.test.y_string_space" {
417test "y_string_space" {
418418 ok(
419419 \\" "
420420 );
421421}
422422
423test "json.test.y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF" {
423test "y_string_surrogates_U+1D11E_MUSICAL_SYMBOL_G_CLEF" {
424424 ok(
425425 \\["\uD834\uDd1e"]
426426 );
427427}
428428
429test "json.test.y_string_three-byte-utf-8" {
429test "y_string_three-byte-utf-8" {
430430 ok(
431431 \\["\u0821"]
432432 );
433433}
434434
435test "json.test.y_string_two-byte-utf-8" {
435test "y_string_two-byte-utf-8" {
436436 ok(
437437 \\["\u0123"]
438438 );
439439}
440440
441test "json.test.y_string_u+2028_line_sep" {
441test "y_string_u+2028_line_sep" {
442442 ok("[\"\xe2\x80\xa8\"]");
443443}
444444
445test "json.test.y_string_u+2029_par_sep" {
445test "y_string_u+2029_par_sep" {
446446 ok("[\"\xe2\x80\xa9\"]");
447447}
448448
449test "json.test.y_string_uescaped_newline" {
449test "y_string_uescaped_newline" {
450450 ok(
451451 \\["new\u000Aline"]
452452 );
453453}
454454
455test "json.test.y_string_uEscape" {
455test "y_string_uEscape" {
456456 ok(
457457 \\["\u0061\u30af\u30EA\u30b9"]
458458 );
459459}
460460
461test "json.test.y_string_unescaped_char_delete" {
461test "y_string_unescaped_char_delete" {
462462 ok("[\"\x7f\"]");
463463}
464464
465test "json.test.y_string_unicode_2" {
465test "y_string_unicode_2" {
466466 ok(
467467 \\["⍂㈴⍂"]
468468 );
469469}
470470
471test "json.test.y_string_unicodeEscapedBackslash" {
471test "y_string_unicodeEscapedBackslash" {
472472 ok(
473473 \\["\u005C"]
474474 );
475475}
476476
477test "json.test.y_string_unicode_escaped_double_quote" {
477test "y_string_unicode_escaped_double_quote" {
478478 ok(
479479 \\["\u0022"]
480480 );
481481}
482482
483test "json.test.y_string_unicode" {
483test "y_string_unicode" {
484484 ok(
485485 \\["\uA66D"]
486486 );
487487}
488488
489test "json.test.y_string_unicode_U+10FFFE_nonchar" {
489test "y_string_unicode_U+10FFFE_nonchar" {
490490 ok(
491491 \\["\uDBFF\uDFFE"]
492492 );
493493}
494494
495test "json.test.y_string_unicode_U+1FFFE_nonchar" {
495test "y_string_unicode_U+1FFFE_nonchar" {
496496 ok(
497497 \\["\uD83F\uDFFE"]
498498 );
499499}
500500
501test "json.test.y_string_unicode_U+200B_ZERO_WIDTH_SPACE" {
501test "y_string_unicode_U+200B_ZERO_WIDTH_SPACE" {
502502 ok(
503503 \\["\u200B"]
504504 );
505505}
506506
507test "json.test.y_string_unicode_U+2064_invisible_plus" {
507test "y_string_unicode_U+2064_invisible_plus" {
508508 ok(
509509 \\["\u2064"]
510510 );
511511}
512512
513test "json.test.y_string_unicode_U+FDD0_nonchar" {
513test "y_string_unicode_U+FDD0_nonchar" {
514514 ok(
515515 \\["\uFDD0"]
516516 );
517517}
518518
519test "json.test.y_string_unicode_U+FFFE_nonchar" {
519test "y_string_unicode_U+FFFE_nonchar" {
520520 ok(
521521 \\["\uFFFE"]
522522 );
523523}
524524
525test "json.test.y_string_utf8" {
525test "y_string_utf8" {
526526 ok(
527527 \\["€𝄞"]
528528 );
529529}
530530
531test "json.test.y_string_with_del_character" {
531test "y_string_with_del_character" {
532532 ok("[\"a\x7fa\"]");
533533}
534534
535test "json.test.y_structure_lonely_false" {
535test "y_structure_lonely_false" {
536536 ok(
537537 \\false
538538 );
539539}
540540
541test "json.test.y_structure_lonely_int" {
541test "y_structure_lonely_int" {
542542 ok(
543543 \\42
544544 );
545545}
546546
547test "json.test.y_structure_lonely_negative_real" {
547test "y_structure_lonely_negative_real" {
548548 ok(
549549 \\-0.1
550550 );
551551}
552552
553test "json.test.y_structure_lonely_null" {
553test "y_structure_lonely_null" {
554554 ok(
555555 \\null
556556 );
557557}
558558
559test "json.test.y_structure_lonely_string" {
559test "y_structure_lonely_string" {
560560 ok(
561561 \\"asd"
562562 );
563563}
564564
565test "json.test.y_structure_lonely_true" {
565test "y_structure_lonely_true" {
566566 ok(
567567 \\true
568568 );
569569}
570570
571test "json.test.y_structure_string_empty" {
571test "y_structure_string_empty" {
572572 ok(
573573 \\""
574574 );
575575}
576576
577test "json.test.y_structure_trailing_newline" {
577test "y_structure_trailing_newline" {
578578 ok(
579579 \\["a"]
580580 );
581581}
582582
583test "json.test.y_structure_true_in_array" {
583test "y_structure_true_in_array" {
584584 ok(
585585 \\[true]
586586 );
587587}
588588
589test "json.test.y_structure_whitespace_array" {
589test "y_structure_whitespace_array" {
590590 ok(" [] ");
591591}
592592
593593////////////////////////////////////////////////////////////////////////////////////////////////////
594594
595test "json.test.n_array_1_true_without_comma" {
595test "n_array_1_true_without_comma" {
596596 err(
597597 \\[1 true]
598598 );
599599}
600600
601test "json.test.n_array_a_invalid_utf8" {
601test "n_array_a_invalid_utf8" {
602602 err(
603603 \\[aå]
604604 );
605605}
606606
607test "json.test.n_array_colon_instead_of_comma" {
607test "n_array_colon_instead_of_comma" {
608608 err(
609609 \\["": 1]
610610 );
611611}
612612
613test "json.test.n_array_comma_after_close" {
613test "n_array_comma_after_close" {
614614 //err(
615615 // \\[""],
616616 //);
617617}
618618
619test "json.test.n_array_comma_and_number" {
619test "n_array_comma_and_number" {
620620 err(
621621 \\[,1]
622622 );
623623}
624624
625test "json.test.n_array_double_comma" {
625test "n_array_double_comma" {
626626 err(
627627 \\[1,,2]
628628 );
629629}
630630
631test "json.test.n_array_double_extra_comma" {
631test "n_array_double_extra_comma" {
632632 err(
633633 \\["x",,]
634634 );
635635}
636636
637test "json.test.n_array_extra_close" {
637test "n_array_extra_close" {
638638 err(
639639 \\["x"]]
640640 );
641641}
642642
643test "json.test.n_array_extra_comma" {
643test "n_array_extra_comma" {
644644 //err(
645645 // \\["",]
646646 //);
647647}
648648
649test "json.test.n_array_incomplete_invalid_value" {
649test "n_array_incomplete_invalid_value" {
650650 err(
651651 \\[x
652652 );
653653}
654654
655test "json.test.n_array_incomplete" {
655test "n_array_incomplete" {
656656 err(
657657 \\["x"
658658 );
659659}
660660
661test "json.test.n_array_inner_array_no_comma" {
661test "n_array_inner_array_no_comma" {
662662 err(
663663 \\[3[4]]
664664 );
665665}
666666
667test "json.test.n_array_invalid_utf8" {
667test "n_array_invalid_utf8" {
668668 err(
669669 \\[ÿ]
670670 );
671671}
672672
673test "json.test.n_array_items_separated_by_semicolon" {
673test "n_array_items_separated_by_semicolon" {
674674 err(
675675 \\[1:2]
676676 );
677677}
678678
679test "json.test.n_array_just_comma" {
679test "n_array_just_comma" {
680680 err(
681681 \\[,]
682682 );
683683}
684684
685test "json.test.n_array_just_minus" {
685test "n_array_just_minus" {
686686 err(
687687 \\[-]
688688 );
689689}
690690
691test "json.test.n_array_missing_value" {
691test "n_array_missing_value" {
692692 err(
693693 \\[ , ""]
694694 );
695695}
696696
697test "json.test.n_array_newlines_unclosed" {
697test "n_array_newlines_unclosed" {
698698 err(
699699 \\["a",
700700 \\4
......@@ -702,41 +702,41 @@ test "json.test.n_array_newlines_unclosed" {
702702 );
703703}
704704
705test "json.test.n_array_number_and_comma" {
705test "n_array_number_and_comma" {
706706 err(
707707 \\[1,]
708708 );
709709}
710710
711test "json.test.n_array_number_and_several_commas" {
711test "n_array_number_and_several_commas" {
712712 err(
713713 \\[1,,]
714714 );
715715}
716716
717test "json.test.n_array_spaces_vertical_tab_formfeed" {
717test "n_array_spaces_vertical_tab_formfeed" {
718718 err("[\"\x0aa\"\\f]");
719719}
720720
721test "json.test.n_array_star_inside" {
721test "n_array_star_inside" {
722722 err(
723723 \\[*]
724724 );
725725}
726726
727test "json.test.n_array_unclosed" {
727test "n_array_unclosed" {
728728 err(
729729 \\[""
730730 );
731731}
732732
733test "json.test.n_array_unclosed_trailing_comma" {
733test "n_array_unclosed_trailing_comma" {
734734 err(
735735 \\[1,
736736 );
737737}
738738
739test "json.test.n_array_unclosed_with_new_lines" {
739test "n_array_unclosed_with_new_lines" {
740740 err(
741741 \\[1,
742742 \\1
......@@ -744,956 +744,956 @@ test "json.test.n_array_unclosed_with_new_lines" {
744744 );
745745}
746746
747test "json.test.n_array_unclosed_with_object_inside" {
747test "n_array_unclosed_with_object_inside" {
748748 err(
749749 \\[{}
750750 );
751751}
752752
753test "json.test.n_incomplete_false" {
753test "n_incomplete_false" {
754754 err(
755755 \\[fals]
756756 );
757757}
758758
759test "json.test.n_incomplete_null" {
759test "n_incomplete_null" {
760760 err(
761761 \\[nul]
762762 );
763763}
764764
765test "json.test.n_incomplete_true" {
765test "n_incomplete_true" {
766766 err(
767767 \\[tru]
768768 );
769769}
770770
771test "json.test.n_multidigit_number_then_00" {
771test "n_multidigit_number_then_00" {
772772 err("123\x00");
773773}
774774
775test "json.test.n_number_0.1.2" {
775test "n_number_0.1.2" {
776776 err(
777777 \\[0.1.2]
778778 );
779779}
780780
781test "json.test.n_number_-01" {
781test "n_number_-01" {
782782 err(
783783 \\[-01]
784784 );
785785}
786786
787test "json.test.n_number_0.3e" {
787test "n_number_0.3e" {
788788 err(
789789 \\[0.3e]
790790 );
791791}
792792
793test "json.test.n_number_0.3e+" {
793test "n_number_0.3e+" {
794794 err(
795795 \\[0.3e+]
796796 );
797797}
798798
799test "json.test.n_number_0_capital_E" {
799test "n_number_0_capital_E" {
800800 err(
801801 \\[0E]
802802 );
803803}
804804
805test "json.test.n_number_0_capital_E+" {
805test "n_number_0_capital_E+" {
806806 err(
807807 \\[0E+]
808808 );
809809}
810810
811test "json.test.n_number_0.e1" {
811test "n_number_0.e1" {
812812 err(
813813 \\[0.e1]
814814 );
815815}
816816
817test "json.test.n_number_0e" {
817test "n_number_0e" {
818818 err(
819819 \\[0e]
820820 );
821821}
822822
823test "json.test.n_number_0e+" {
823test "n_number_0e+" {
824824 err(
825825 \\[0e+]
826826 );
827827}
828828
829test "json.test.n_number_1_000" {
829test "n_number_1_000" {
830830 err(
831831 \\[1 000.0]
832832 );
833833}
834834
835test "json.test.n_number_1.0e-" {
835test "n_number_1.0e-" {
836836 err(
837837 \\[1.0e-]
838838 );
839839}
840840
841test "json.test.n_number_1.0e" {
841test "n_number_1.0e" {
842842 err(
843843 \\[1.0e]
844844 );
845845}
846846
847test "json.test.n_number_1.0e+" {
847test "n_number_1.0e+" {
848848 err(
849849 \\[1.0e+]
850850 );
851851}
852852
853test "json.test.n_number_-1.0." {
853test "n_number_-1.0." {
854854 err(
855855 \\[-1.0.]
856856 );
857857}
858858
859test "json.test.n_number_1eE2" {
859test "n_number_1eE2" {
860860 err(
861861 \\[1eE2]
862862 );
863863}
864864
865test "json.test.n_number_.-1" {
865test "n_number_.-1" {
866866 err(
867867 \\[.-1]
868868 );
869869}
870870
871test "json.test.n_number_+1" {
871test "n_number_+1" {
872872 err(
873873 \\[+1]
874874 );
875875}
876876
877test "json.test.n_number_.2e-3" {
877test "n_number_.2e-3" {
878878 err(
879879 \\[.2e-3]
880880 );
881881}
882882
883test "json.test.n_number_2.e-3" {
883test "n_number_2.e-3" {
884884 err(
885885 \\[2.e-3]
886886 );
887887}
888888
889test "json.test.n_number_2.e+3" {
889test "n_number_2.e+3" {
890890 err(
891891 \\[2.e+3]
892892 );
893893}
894894
895test "json.test.n_number_2.e3" {
895test "n_number_2.e3" {
896896 err(
897897 \\[2.e3]
898898 );
899899}
900900
901test "json.test.n_number_-2." {
901test "n_number_-2." {
902902 err(
903903 \\[-2.]
904904 );
905905}
906906
907test "json.test.n_number_9.e+" {
907test "n_number_9.e+" {
908908 err(
909909 \\[9.e+]
910910 );
911911}
912912
913test "json.test.n_number_expression" {
913test "n_number_expression" {
914914 err(
915915 \\[1+2]
916916 );
917917}
918918
919test "json.test.n_number_hex_1_digit" {
919test "n_number_hex_1_digit" {
920920 err(
921921 \\[0x1]
922922 );
923923}
924924
925test "json.test.n_number_hex_2_digits" {
925test "n_number_hex_2_digits" {
926926 err(
927927 \\[0x42]
928928 );
929929}
930930
931test "json.test.n_number_infinity" {
931test "n_number_infinity" {
932932 err(
933933 \\[Infinity]
934934 );
935935}
936936
937test "json.test.n_number_+Inf" {
937test "n_number_+Inf" {
938938 err(
939939 \\[+Inf]
940940 );
941941}
942942
943test "json.test.n_number_Inf" {
943test "n_number_Inf" {
944944 err(
945945 \\[Inf]
946946 );
947947}
948948
949test "json.test.n_number_invalid+-" {
949test "n_number_invalid+-" {
950950 err(
951951 \\[0e+-1]
952952 );
953953}
954954
955test "json.test.n_number_invalid-negative-real" {
955test "n_number_invalid-negative-real" {
956956 err(
957957 \\[-123.123foo]
958958 );
959959}
960960
961test "json.test.n_number_invalid-utf-8-in-bigger-int" {
961test "n_number_invalid-utf-8-in-bigger-int" {
962962 err(
963963 \\[123å]
964964 );
965965}
966966
967test "json.test.n_number_invalid-utf-8-in-exponent" {
967test "n_number_invalid-utf-8-in-exponent" {
968968 err(
969969 \\[1e1å]
970970 );
971971}
972972
973test "json.test.n_number_invalid-utf-8-in-int" {
973test "n_number_invalid-utf-8-in-int" {
974974 err(
975975 \\[0å]
976976 );
977977}
978978
979test "json.test.n_number_++" {
979test "n_number_++" {
980980 err(
981981 \\[++1234]
982982 );
983983}
984984
985test "json.test.n_number_minus_infinity" {
985test "n_number_minus_infinity" {
986986 err(
987987 \\[-Infinity]
988988 );
989989}
990990
991test "json.test.n_number_minus_sign_with_trailing_garbage" {
991test "n_number_minus_sign_with_trailing_garbage" {
992992 err(
993993 \\[-foo]
994994 );
995995}
996996
997test "json.test.n_number_minus_space_1" {
997test "n_number_minus_space_1" {
998998 err(
999999 \\[- 1]
10001000 );
10011001}
10021002
1003test "json.test.n_number_-NaN" {
1003test "n_number_-NaN" {
10041004 err(
10051005 \\[-NaN]
10061006 );
10071007}
10081008
1009test "json.test.n_number_NaN" {
1009test "n_number_NaN" {
10101010 err(
10111011 \\[NaN]
10121012 );
10131013}
10141014
1015test "json.test.n_number_neg_int_starting_with_zero" {
1015test "n_number_neg_int_starting_with_zero" {
10161016 err(
10171017 \\[-012]
10181018 );
10191019}
10201020
1021test "json.test.n_number_neg_real_without_int_part" {
1021test "n_number_neg_real_without_int_part" {
10221022 err(
10231023 \\[-.123]
10241024 );
10251025}
10261026
1027test "json.test.n_number_neg_with_garbage_at_end" {
1027test "n_number_neg_with_garbage_at_end" {
10281028 err(
10291029 \\[-1x]
10301030 );
10311031}
10321032
1033test "json.test.n_number_real_garbage_after_e" {
1033test "n_number_real_garbage_after_e" {
10341034 err(
10351035 \\[1ea]
10361036 );
10371037}
10381038
1039test "json.test.n_number_real_with_invalid_utf8_after_e" {
1039test "n_number_real_with_invalid_utf8_after_e" {
10401040 err(
10411041 \\[1eå]
10421042 );
10431043}
10441044
1045test "json.test.n_number_real_without_fractional_part" {
1045test "n_number_real_without_fractional_part" {
10461046 err(
10471047 \\[1.]
10481048 );
10491049}
10501050
1051test "json.test.n_number_starting_with_dot" {
1051test "n_number_starting_with_dot" {
10521052 err(
10531053 \\[.123]
10541054 );
10551055}
10561056
1057test "json.test.n_number_U+FF11_fullwidth_digit_one" {
1057test "n_number_U+FF11_fullwidth_digit_one" {
10581058 err(
10591059 \\[1]
10601060 );
10611061}
10621062
1063test "json.test.n_number_with_alpha_char" {
1063test "n_number_with_alpha_char" {
10641064 err(
10651065 \\[1.8011670033376514H-308]
10661066 );
10671067}
10681068
1069test "json.test.n_number_with_alpha" {
1069test "n_number_with_alpha" {
10701070 err(
10711071 \\[1.2a-3]
10721072 );
10731073}
10741074
1075test "json.test.n_number_with_leading_zero" {
1075test "n_number_with_leading_zero" {
10761076 err(
10771077 \\[012]
10781078 );
10791079}
10801080
1081test "json.test.n_object_bad_value" {
1081test "n_object_bad_value" {
10821082 err(
10831083 \\["x", truth]
10841084 );
10851085}
10861086
1087test "json.test.n_object_bracket_key" {
1087test "n_object_bracket_key" {
10881088 err(
10891089 \\{[: "x"}
10901090 );
10911091}
10921092
1093test "json.test.n_object_comma_instead_of_colon" {
1093test "n_object_comma_instead_of_colon" {
10941094 err(
10951095 \\{"x", null}
10961096 );
10971097}
10981098
1099test "json.test.n_object_double_colon" {
1099test "n_object_double_colon" {
11001100 err(
11011101 \\{"x"::"b"}
11021102 );
11031103}
11041104
1105test "json.test.n_object_emoji" {
1105test "n_object_emoji" {
11061106 err(
11071107 \\{🇨🇭}
11081108 );
11091109}
11101110
1111test "json.test.n_object_garbage_at_end" {
1111test "n_object_garbage_at_end" {
11121112 err(
11131113 \\{"a":"a" 123}
11141114 );
11151115}
11161116
1117test "json.test.n_object_key_with_single_quotes" {
1117test "n_object_key_with_single_quotes" {
11181118 err(
11191119 \\{key: 'value'}
11201120 );
11211121}
11221122
1123test "json.test.n_object_lone_continuation_byte_in_key_and_trailing_comma" {
1123test "n_object_lone_continuation_byte_in_key_and_trailing_comma" {
11241124 err(
11251125 \\{"¹":"0",}
11261126 );
11271127}
11281128
1129test "json.test.n_object_missing_colon" {
1129test "n_object_missing_colon" {
11301130 err(
11311131 \\{"a" b}
11321132 );
11331133}
11341134
1135test "json.test.n_object_missing_key" {
1135test "n_object_missing_key" {
11361136 err(
11371137 \\{:"b"}
11381138 );
11391139}
11401140
1141test "json.test.n_object_missing_semicolon" {
1141test "n_object_missing_semicolon" {
11421142 err(
11431143 \\{"a" "b"}
11441144 );
11451145}
11461146
1147test "json.test.n_object_missing_value" {
1147test "n_object_missing_value" {
11481148 err(
11491149 \\{"a":
11501150 );
11511151}
11521152
1153test "json.test.n_object_no-colon" {
1153test "n_object_no-colon" {
11541154 err(
11551155 \\{"a"
11561156 );
11571157}
11581158
1159test "json.test.n_object_non_string_key_but_huge_number_instead" {
1159test "n_object_non_string_key_but_huge_number_instead" {
11601160 err(
11611161 \\{9999E9999:1}
11621162 );
11631163}
11641164
1165test "json.test.n_object_non_string_key" {
1165test "n_object_non_string_key" {
11661166 err(
11671167 \\{1:1}
11681168 );
11691169}
11701170
1171test "json.test.n_object_repeated_null_null" {
1171test "n_object_repeated_null_null" {
11721172 err(
11731173 \\{null:null,null:null}
11741174 );
11751175}
11761176
1177test "json.test.n_object_several_trailing_commas" {
1177test "n_object_several_trailing_commas" {
11781178 err(
11791179 \\{"id":0,,,,,}
11801180 );
11811181}
11821182
1183test "json.test.n_object_single_quote" {
1183test "n_object_single_quote" {
11841184 err(
11851185 \\{'a':0}
11861186 );
11871187}
11881188
1189test "json.test.n_object_trailing_comma" {
1189test "n_object_trailing_comma" {
11901190 err(
11911191 \\{"id":0,}
11921192 );
11931193}
11941194
1195test "json.test.n_object_trailing_comment" {
1195test "n_object_trailing_comment" {
11961196 err(
11971197 \\{"a":"b"}/**/
11981198 );
11991199}
12001200
1201test "json.test.n_object_trailing_comment_open" {
1201test "n_object_trailing_comment_open" {
12021202 err(
12031203 \\{"a":"b"}/**//
12041204 );
12051205}
12061206
1207test "json.test.n_object_trailing_comment_slash_open_incomplete" {
1207test "n_object_trailing_comment_slash_open_incomplete" {
12081208 err(
12091209 \\{"a":"b"}/
12101210 );
12111211}
12121212
1213test "json.test.n_object_trailing_comment_slash_open" {
1213test "n_object_trailing_comment_slash_open" {
12141214 err(
12151215 \\{"a":"b"}//
12161216 );
12171217}
12181218
1219test "json.test.n_object_two_commas_in_a_row" {
1219test "n_object_two_commas_in_a_row" {
12201220 err(
12211221 \\{"a":"b",,"c":"d"}
12221222 );
12231223}
12241224
1225test "json.test.n_object_unquoted_key" {
1225test "n_object_unquoted_key" {
12261226 err(
12271227 \\{a: "b"}
12281228 );
12291229}
12301230
1231test "json.test.n_object_unterminated-value" {
1231test "n_object_unterminated-value" {
12321232 err(
12331233 \\{"a":"a
12341234 );
12351235}
12361236
1237test "json.test.n_object_with_single_string" {
1237test "n_object_with_single_string" {
12381238 err(
12391239 \\{ "foo" : "bar", "a" }
12401240 );
12411241}
12421242
1243test "json.test.n_object_with_trailing_garbage" {
1243test "n_object_with_trailing_garbage" {
12441244 err(
12451245 \\{"a":"b"}#
12461246 );
12471247}
12481248
1249test "json.test.n_single_space" {
1249test "n_single_space" {
12501250 err(" ");
12511251}
12521252
1253test "json.test.n_string_1_surrogate_then_escape" {
1253test "n_string_1_surrogate_then_escape" {
12541254 err(
12551255 \\["\uD800\"]
12561256 );
12571257}
12581258
1259test "json.test.n_string_1_surrogate_then_escape_u1" {
1259test "n_string_1_surrogate_then_escape_u1" {
12601260 err(
12611261 \\["\uD800\u1"]
12621262 );
12631263}
12641264
1265test "json.test.n_string_1_surrogate_then_escape_u1x" {
1265test "n_string_1_surrogate_then_escape_u1x" {
12661266 err(
12671267 \\["\uD800\u1x"]
12681268 );
12691269}
12701270
1271test "json.test.n_string_1_surrogate_then_escape_u" {
1271test "n_string_1_surrogate_then_escape_u" {
12721272 err(
12731273 \\["\uD800\u"]
12741274 );
12751275}
12761276
1277test "json.test.n_string_accentuated_char_no_quotes" {
1277test "n_string_accentuated_char_no_quotes" {
12781278 err(
12791279 \\[é]
12801280 );
12811281}
12821282
1283test "json.test.n_string_backslash_00" {
1283test "n_string_backslash_00" {
12841284 err("[\"\x00\"]");
12851285}
12861286
1287test "json.test.n_string_escaped_backslash_bad" {
1287test "n_string_escaped_backslash_bad" {
12881288 err(
12891289 \\["\\\"]
12901290 );
12911291}
12921292
1293test "json.test.n_string_escaped_ctrl_char_tab" {
1293test "n_string_escaped_ctrl_char_tab" {
12941294 err("\x5b\x22\x5c\x09\x22\x5d");
12951295}
12961296
1297test "json.test.n_string_escaped_emoji" {
1297test "n_string_escaped_emoji" {
12981298 err("[\"\x5c\xc3\xb0\xc2\x9f\xc2\x8c\xc2\x80\"]");
12991299}
13001300
1301test "json.test.n_string_escape_x" {
1301test "n_string_escape_x" {
13021302 err(
13031303 \\["\x00"]
13041304 );
13051305}
13061306
1307test "json.test.n_string_incomplete_escaped_character" {
1307test "n_string_incomplete_escaped_character" {
13081308 err(
13091309 \\["\u00A"]
13101310 );
13111311}
13121312
1313test "json.test.n_string_incomplete_escape" {
1313test "n_string_incomplete_escape" {
13141314 err(
13151315 \\["\"]
13161316 );
13171317}
13181318
1319test "json.test.n_string_incomplete_surrogate_escape_invalid" {
1319test "n_string_incomplete_surrogate_escape_invalid" {
13201320 err(
13211321 \\["\uD800\uD800\x"]
13221322 );
13231323}
13241324
1325test "json.test.n_string_incomplete_surrogate" {
1325test "n_string_incomplete_surrogate" {
13261326 err(
13271327 \\["\uD834\uDd"]
13281328 );
13291329}
13301330
1331test "json.test.n_string_invalid_backslash_esc" {
1331test "n_string_invalid_backslash_esc" {
13321332 err(
13331333 \\["\a"]
13341334 );
13351335}
13361336
1337test "json.test.n_string_invalid_unicode_escape" {
1337test "n_string_invalid_unicode_escape" {
13381338 err(
13391339 \\["\uqqqq"]
13401340 );
13411341}
13421342
1343test "json.test.n_string_invalid_utf8_after_escape" {
1343test "n_string_invalid_utf8_after_escape" {
13441344 err("[\"\\\x75\xc3\xa5\"]");
13451345}
13461346
1347test "json.test.n_string_invalid-utf-8-in-escape" {
1347test "n_string_invalid-utf-8-in-escape" {
13481348 err(
13491349 \\["\uå"]
13501350 );
13511351}
13521352
1353test "json.test.n_string_leading_uescaped_thinspace" {
1353test "n_string_leading_uescaped_thinspace" {
13541354 err(
13551355 \\[\u0020"asd"]
13561356 );
13571357}
13581358
1359test "json.test.n_string_no_quotes_with_bad_escape" {
1359test "n_string_no_quotes_with_bad_escape" {
13601360 err(
13611361 \\[\n]
13621362 );
13631363}
13641364
1365test "json.test.n_string_single_doublequote" {
1365test "n_string_single_doublequote" {
13661366 err(
13671367 \\"
13681368 );
13691369}
13701370
1371test "json.test.n_string_single_quote" {
1371test "n_string_single_quote" {
13721372 err(
13731373 \\['single quote']
13741374 );
13751375}
13761376
1377test "json.test.n_string_single_string_no_double_quotes" {
1377test "n_string_single_string_no_double_quotes" {
13781378 err(
13791379 \\abc
13801380 );
13811381}
13821382
1383test "json.test.n_string_start_escape_unclosed" {
1383test "n_string_start_escape_unclosed" {
13841384 err(
13851385 \\["\
13861386 );
13871387}
13881388
1389test "json.test.n_string_unescaped_crtl_char" {
1389test "n_string_unescaped_crtl_char" {
13901390 err("[\"a\x00a\"]");
13911391}
13921392
1393test "json.test.n_string_unescaped_newline" {
1393test "n_string_unescaped_newline" {
13941394 err(
13951395 \\["new
13961396 \\line"]
13971397 );
13981398}
13991399
1400test "json.test.n_string_unescaped_tab" {
1400test "n_string_unescaped_tab" {
14011401 err("[\"\t\"]");
14021402}
14031403
1404test "json.test.n_string_unicode_CapitalU" {
1404test "n_string_unicode_CapitalU" {
14051405 err(
14061406 \\"\UA66D"
14071407 );
14081408}
14091409
1410test "json.test.n_string_with_trailing_garbage" {
1410test "n_string_with_trailing_garbage" {
14111411 err(
14121412 \\""x
14131413 );
14141414}
14151415
1416test "json.test.n_structure_100000_opening_arrays" {
1416test "n_structure_100000_opening_arrays" {
14171417 err("[" ** 100000);
14181418}
14191419
1420test "json.test.n_structure_angle_bracket_." {
1420test "n_structure_angle_bracket_." {
14211421 err(
14221422 \\<.>
14231423 );
14241424}
14251425
1426test "json.test.n_structure_angle_bracket_null" {
1426test "n_structure_angle_bracket_null" {
14271427 err(
14281428 \\[<null>]
14291429 );
14301430}
14311431
1432test "json.test.n_structure_array_trailing_garbage" {
1432test "n_structure_array_trailing_garbage" {
14331433 err(
14341434 \\[1]x
14351435 );
14361436}
14371437
1438test "json.test.n_structure_array_with_extra_array_close" {
1438test "n_structure_array_with_extra_array_close" {
14391439 err(
14401440 \\[1]]
14411441 );
14421442}
14431443
1444test "json.test.n_structure_array_with_unclosed_string" {
1444test "n_structure_array_with_unclosed_string" {
14451445 err(
14461446 \\["asd]
14471447 );
14481448}
14491449
1450test "json.test.n_structure_ascii-unicode-identifier" {
1450test "n_structure_ascii-unicode-identifier" {
14511451 err(
14521452 \\aå
14531453 );
14541454}
14551455
1456test "json.test.n_structure_capitalized_True" {
1456test "n_structure_capitalized_True" {
14571457 err(
14581458 \\[True]
14591459 );
14601460}
14611461
1462test "json.test.n_structure_close_unopened_array" {
1462test "n_structure_close_unopened_array" {
14631463 err(
14641464 \\1]
14651465 );
14661466}
14671467
1468test "json.test.n_structure_comma_instead_of_closing_brace" {
1468test "n_structure_comma_instead_of_closing_brace" {
14691469 err(
14701470 \\{"x": true,
14711471 );
14721472}
14731473
1474test "json.test.n_structure_double_array" {
1474test "n_structure_double_array" {
14751475 err(
14761476 \\[][]
14771477 );
14781478}
14791479
1480test "json.test.n_structure_end_array" {
1480test "n_structure_end_array" {
14811481 err(
14821482 \\]
14831483 );
14841484}
14851485
1486test "json.test.n_structure_incomplete_UTF8_BOM" {
1486test "n_structure_incomplete_UTF8_BOM" {
14871487 err(
14881488 \\ï»{}
14891489 );
14901490}
14911491
1492test "json.test.n_structure_lone-invalid-utf-8" {
1492test "n_structure_lone-invalid-utf-8" {
14931493 err(
14941494 \\å
14951495 );
14961496}
14971497
1498test "json.test.n_structure_lone-open-bracket" {
1498test "n_structure_lone-open-bracket" {
14991499 err(
15001500 \\[
15011501 );
15021502}
15031503
1504test "json.test.n_structure_no_data" {
1504test "n_structure_no_data" {
15051505 err(
15061506 \\
15071507 );
15081508}
15091509
1510test "json.test.n_structure_null-byte-outside-string" {
1510test "n_structure_null-byte-outside-string" {
15111511 err("[\x00]");
15121512}
15131513
1514test "json.test.n_structure_number_with_trailing_garbage" {
1514test "n_structure_number_with_trailing_garbage" {
15151515 err(
15161516 \\2@
15171517 );
15181518}
15191519
1520test "json.test.n_structure_object_followed_by_closing_object" {
1520test "n_structure_object_followed_by_closing_object" {
15211521 err(
15221522 \\{}}
15231523 );
15241524}
15251525
1526test "json.test.n_structure_object_unclosed_no_value" {
1526test "n_structure_object_unclosed_no_value" {
15271527 err(
15281528 \\{"":
15291529 );
15301530}
15311531
1532test "json.test.n_structure_object_with_comment" {
1532test "n_structure_object_with_comment" {
15331533 err(
15341534 \\{"a":/*comment*/"b"}
15351535 );
15361536}
15371537
1538test "json.test.n_structure_object_with_trailing_garbage" {
1538test "n_structure_object_with_trailing_garbage" {
15391539 err(
15401540 \\{"a": true} "x"
15411541 );
15421542}
15431543
1544test "json.test.n_structure_open_array_apostrophe" {
1544test "n_structure_open_array_apostrophe" {
15451545 err(
15461546 \\['
15471547 );
15481548}
15491549
1550test "json.test.n_structure_open_array_comma" {
1550test "n_structure_open_array_comma" {
15511551 err(
15521552 \\[,
15531553 );
15541554}
15551555
1556test "json.test.n_structure_open_array_object" {
1556test "n_structure_open_array_object" {
15571557 err("[{\"\":" ** 50000);
15581558}
15591559
1560test "json.test.n_structure_open_array_open_object" {
1560test "n_structure_open_array_open_object" {
15611561 err(
15621562 \\[{
15631563 );
15641564}
15651565
1566test "json.test.n_structure_open_array_open_string" {
1566test "n_structure_open_array_open_string" {
15671567 err(
15681568 \\["a
15691569 );
15701570}
15711571
1572test "json.test.n_structure_open_array_string" {
1572test "n_structure_open_array_string" {
15731573 err(
15741574 \\["a"
15751575 );
15761576}
15771577
1578test "json.test.n_structure_open_object_close_array" {
1578test "n_structure_open_object_close_array" {
15791579 err(
15801580 \\{]
15811581 );
15821582}
15831583
1584test "json.test.n_structure_open_object_comma" {
1584test "n_structure_open_object_comma" {
15851585 err(
15861586 \\{,
15871587 );
15881588}
15891589
1590test "json.test.n_structure_open_object" {
1590test "n_structure_open_object" {
15911591 err(
15921592 \\{
15931593 );
15941594}
15951595
1596test "json.test.n_structure_open_object_open_array" {
1596test "n_structure_open_object_open_array" {
15971597 err(
15981598 \\{[
15991599 );
16001600}
16011601
1602test "json.test.n_structure_open_object_open_string" {
1602test "n_structure_open_object_open_string" {
16031603 err(
16041604 \\{"a
16051605 );
16061606}
16071607
1608test "json.test.n_structure_open_object_string_with_apostrophes" {
1608test "n_structure_open_object_string_with_apostrophes" {
16091609 err(
16101610 \\{'a'
16111611 );
16121612}
16131613
1614test "json.test.n_structure_open_open" {
1614test "n_structure_open_open" {
16151615 err(
16161616 \\["\{["\{["\{["\{
16171617 );
16181618}
16191619
1620test "json.test.n_structure_single_eacute" {
1620test "n_structure_single_eacute" {
16211621 err(
16221622 \\é
16231623 );
16241624}
16251625
1626test "json.test.n_structure_single_star" {
1626test "n_structure_single_star" {
16271627 err(
16281628 \\*
16291629 );
16301630}
16311631
1632test "json.test.n_structure_trailing_#" {
1632test "n_structure_trailing_#" {
16331633 err(
16341634 \\{"a":"b"}#{}
16351635 );
16361636}
16371637
1638test "json.test.n_structure_U+2060_word_joined" {
1638test "n_structure_U+2060_word_joined" {
16391639 err(
16401640 \\[⁠]
16411641 );
16421642}
16431643
1644test "json.test.n_structure_uescaped_LF_before_string" {
1644test "n_structure_uescaped_LF_before_string" {
16451645 err(
16461646 \\[\u000A""]
16471647 );
16481648}
16491649
1650test "json.test.n_structure_unclosed_array" {
1650test "n_structure_unclosed_array" {
16511651 err(
16521652 \\[1
16531653 );
16541654}
16551655
1656test "json.test.n_structure_unclosed_array_partial_null" {
1656test "n_structure_unclosed_array_partial_null" {
16571657 err(
16581658 \\[ false, nul
16591659 );
16601660}
16611661
1662test "json.test.n_structure_unclosed_array_unfinished_false" {
1662test "n_structure_unclosed_array_unfinished_false" {
16631663 err(
16641664 \\[ true, fals
16651665 );
16661666}
16671667
1668test "json.test.n_structure_unclosed_array_unfinished_true" {
1668test "n_structure_unclosed_array_unfinished_true" {
16691669 err(
16701670 \\[ false, tru
16711671 );
16721672}
16731673
1674test "json.test.n_structure_unclosed_object" {
1674test "n_structure_unclosed_object" {
16751675 err(
16761676 \\{"asd":"asd"
16771677 );
16781678}
16791679
1680test "json.test.n_structure_unicode-identifier" {
1680test "n_structure_unicode-identifier" {
16811681 err(
16821682 \\Ã¥
16831683 );
16841684}
16851685
1686test "json.test.n_structure_UTF8_BOM_no_data" {
1686test "n_structure_UTF8_BOM_no_data" {
16871687 err(
16881688 \\
16891689 );
16901690}
16911691
1692test "json.test.n_structure_whitespace_formfeed" {
1692test "n_structure_whitespace_formfeed" {
16931693 err("[\x0c]");
16941694}
16951695
1696test "json.test.n_structure_whitespace_U+2060_word_joiner" {
1696test "n_structure_whitespace_U+2060_word_joiner" {
16971697 err(
16981698 \\[⁠]
16991699 );
......@@ -1701,203 +1701,203 @@ test "json.test.n_structure_whitespace_U+2060_word_joiner" {
17011701
17021702////////////////////////////////////////////////////////////////////////////////////////////////////
17031703
1704test "json.test.i_number_double_huge_neg_exp" {
1704test "i_number_double_huge_neg_exp" {
17051705 any(
17061706 \\[123.456e-789]
17071707 );
17081708}
17091709
1710test "json.test.i_number_huge_exp" {
1710test "i_number_huge_exp" {
17111711 any(
17121712 \\[0.4e00669999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999969999999006]
17131713 );
17141714}
17151715
1716test "json.test.i_number_neg_int_huge_exp" {
1716test "i_number_neg_int_huge_exp" {
17171717 any(
17181718 \\[-1e+9999]
17191719 );
17201720}
17211721
1722test "json.test.i_number_pos_double_huge_exp" {
1722test "i_number_pos_double_huge_exp" {
17231723 any(
17241724 \\[1.5e+9999]
17251725 );
17261726}
17271727
1728test "json.test.i_number_real_neg_overflow" {
1728test "i_number_real_neg_overflow" {
17291729 any(
17301730 \\[-123123e100000]
17311731 );
17321732}
17331733
1734test "json.test.i_number_real_pos_overflow" {
1734test "i_number_real_pos_overflow" {
17351735 any(
17361736 \\[123123e100000]
17371737 );
17381738}
17391739
1740test "json.test.i_number_real_underflow" {
1740test "i_number_real_underflow" {
17411741 any(
17421742 \\[123e-10000000]
17431743 );
17441744}
17451745
1746test "json.test.i_number_too_big_neg_int" {
1746test "i_number_too_big_neg_int" {
17471747 any(
17481748 \\[-123123123123123123123123123123]
17491749 );
17501750}
17511751
1752test "json.test.i_number_too_big_pos_int" {
1752test "i_number_too_big_pos_int" {
17531753 any(
17541754 \\[100000000000000000000]
17551755 );
17561756}
17571757
1758test "json.test.i_number_very_big_negative_int" {
1758test "i_number_very_big_negative_int" {
17591759 any(
17601760 \\[-237462374673276894279832749832423479823246327846]
17611761 );
17621762}
17631763
1764test "json.test.i_object_key_lone_2nd_surrogate" {
1764test "i_object_key_lone_2nd_surrogate" {
17651765 any(
17661766 \\{"\uDFAA":0}
17671767 );
17681768}
17691769
1770test "json.test.i_string_1st_surrogate_but_2nd_missing" {
1770test "i_string_1st_surrogate_but_2nd_missing" {
17711771 any(
17721772 \\["\uDADA"]
17731773 );
17741774}
17751775
1776test "json.test.i_string_1st_valid_surrogate_2nd_invalid" {
1776test "i_string_1st_valid_surrogate_2nd_invalid" {
17771777 any(
17781778 \\["\uD888\u1234"]
17791779 );
17801780}
17811781
1782test "json.test.i_string_incomplete_surrogate_and_escape_valid" {
1782test "i_string_incomplete_surrogate_and_escape_valid" {
17831783 any(
17841784 \\["\uD800\n"]
17851785 );
17861786}
17871787
1788test "json.test.i_string_incomplete_surrogate_pair" {
1788test "i_string_incomplete_surrogate_pair" {
17891789 any(
17901790 \\["\uDd1ea"]
17911791 );
17921792}
17931793
1794test "json.test.i_string_incomplete_surrogates_escape_valid" {
1794test "i_string_incomplete_surrogates_escape_valid" {
17951795 any(
17961796 \\["\uD800\uD800\n"]
17971797 );
17981798}
17991799
1800test "json.test.i_string_invalid_lonely_surrogate" {
1800test "i_string_invalid_lonely_surrogate" {
18011801 any(
18021802 \\["\ud800"]
18031803 );
18041804}
18051805
1806test "json.test.i_string_invalid_surrogate" {
1806test "i_string_invalid_surrogate" {
18071807 any(
18081808 \\["\ud800abc"]
18091809 );
18101810}
18111811
1812test "json.test.i_string_invalid_utf-8" {
1812test "i_string_invalid_utf-8" {
18131813 any(
18141814 \\["ÿ"]
18151815 );
18161816}
18171817
1818test "json.test.i_string_inverted_surrogates_U+1D11E" {
1818test "i_string_inverted_surrogates_U+1D11E" {
18191819 any(
18201820 \\["\uDd1e\uD834"]
18211821 );
18221822}
18231823
1824test "json.test.i_string_iso_latin_1" {
1824test "i_string_iso_latin_1" {
18251825 any(
18261826 \\["é"]
18271827 );
18281828}
18291829
1830test "json.test.i_string_lone_second_surrogate" {
1830test "i_string_lone_second_surrogate" {
18311831 any(
18321832 \\["\uDFAA"]
18331833 );
18341834}
18351835
1836test "json.test.i_string_lone_utf8_continuation_byte" {
1836test "i_string_lone_utf8_continuation_byte" {
18371837 any(
18381838 \\[""]
18391839 );
18401840}
18411841
1842test "json.test.i_string_not_in_unicode_range" {
1842test "i_string_not_in_unicode_range" {
18431843 any(
18441844 \\["ô¿¿¿"]
18451845 );
18461846}
18471847
1848test "json.test.i_string_overlong_sequence_2_bytes" {
1848test "i_string_overlong_sequence_2_bytes" {
18491849 any(
18501850 \\["À¯"]
18511851 );
18521852}
18531853
1854test "json.test.i_string_overlong_sequence_6_bytes" {
1854test "i_string_overlong_sequence_6_bytes" {
18551855 any(
18561856 \\["üƒ¿¿¿¿"]
18571857 );
18581858}
18591859
1860test "json.test.i_string_overlong_sequence_6_bytes_null" {
1860test "i_string_overlong_sequence_6_bytes_null" {
18611861 any(
18621862 \\["ü€€€€€"]
18631863 );
18641864}
18651865
1866test "json.test.i_string_truncated-utf-8" {
1866test "i_string_truncated-utf-8" {
18671867 any(
18681868 \\["àÿ"]
18691869 );
18701870}
18711871
1872test "json.test.i_string_utf16BE_no_BOM" {
1872test "i_string_utf16BE_no_BOM" {
18731873 any("\x00\x5b\x00\x22\x00\xc3\xa9\x00\x22\x00\x5d");
18741874}
18751875
1876test "json.test.i_string_utf16LE_no_BOM" {
1876test "i_string_utf16LE_no_BOM" {
18771877 any("\x5b\x00\x22\x00\xc3\xa9\x00\x22\x00\x5d\x00");
18781878}
18791879
1880test "json.test.i_string_UTF-16LE_with_BOM" {
1880test "i_string_UTF-16LE_with_BOM" {
18811881 any("\xc3\xbf\xc3\xbe\x5b\x00\x22\x00\xc3\xa9\x00\x22\x00\x5d\x00");
18821882}
18831883
1884test "json.test.i_string_UTF-8_invalid_sequence" {
1884test "i_string_UTF-8_invalid_sequence" {
18851885 any(
18861886 \\["日шú"]
18871887 );
18881888}
18891889
1890test "json.test.i_string_UTF8_surrogate_U+D800" {
1890test "i_string_UTF8_surrogate_U+D800" {
18911891 any(
18921892 \\["í €"]
18931893 );
18941894}
18951895
1896test "json.test.i_structure_500_nested_arrays" {
1896test "i_structure_500_nested_arrays" {
18971897 any(("[" ** 500) ++ ("]" ** 500));
18981898}
18991899
1900test "json.test.i_structure_UTF-8_BOM_empty_object" {
1900test "i_structure_UTF-8_BOM_empty_object" {
19011901 any(
19021902 \\{}
19031903 );