| 863 | //------------------------------------------------------ |
| 864 | |
| 865 | void |
| 866 | testArray() |
| 867 | { |
| 868 | grind("[]"); |
| 869 | grind(" []"); |
| 870 | grind("[] "); |
| 871 | grind(" [] "); |
| 872 | grind(" [ ] "); |
| 873 | grind("[1]"); |
| 874 | grind("[ 1]"); |
| 875 | grind("[1 ]"); |
| 876 | grind("[ 1 ]"); |
| 877 | grind("[1,2]"); |
| 878 | grind("[ 1,2]"); |
| 879 | grind("[1 ,2]"); |
| 880 | grind("[1, 2]"); |
| 881 | grind("[1,2 ]"); |
| 882 | grind("[ 1 ,2]"); |
| 883 | grind("[1 , 2]"); |
| 884 | grind("[1, 2 ]"); |
| 885 | |
| 886 | grind("[[]]"); |
| 887 | grind("[[],[]]"); |
| 888 | grind("[[],[],[]]"); |
| 889 | grind("[[[]],[[],[]],[[],[],[]]]"); |
| 890 | grind("[{},[],\"x\",1,-1,1.0,true,null]"); |
| 891 | |
| 892 | // depth |
| 893 | { |
| 894 | system::error_code ec; |
| 895 | parse_options opt; |
| 896 | opt.max_depth = 0; |
| 897 | stream_parser p(storage_ptr(), opt); |
| 898 | p.write("[]", 2, ec); |
| 899 | BOOST_TEST( |
| 900 | ec == error::too_deep); |
| 901 | BOOST_TEST(ec.has_location()); |
| 902 | } |
| 903 | } |
| 904 | |
| 905 | //------------------------------------------------------ |
| 906 |
nothing calls this directly
no test coverage detected