| 822 | } |
| 823 | |
| 824 | void |
| 825 | testParseVectors() |
| 826 | { |
| 827 | using all_param_combinations = enumerate_bit_vectors<4>; |
| 828 | std::vector<parse_options> all_configs ; |
| 829 | mp11::mp_for_each<all_param_combinations>( |
| 830 | options_maker(all_configs)); |
| 831 | parse_vectors pv; |
| 832 | for(auto const& v : pv) |
| 833 | { |
| 834 | // skip these , because basic_parser |
| 835 | // doesn't have a max_depth setting. |
| 836 | if( v.name == "structure_100000_opening_arrays" || |
| 837 | v.name == "structure_open_array_object") |
| 838 | { |
| 839 | continue; |
| 840 | } |
| 841 | for (const parse_options& po : all_configs) |
| 842 | { |
| 843 | if(v.result == 'i') |
| 844 | { |
| 845 | system::error_code ec; |
| 846 | fail_parser p(po); |
| 847 | p.write( |
| 848 | false, |
| 849 | v.text.data(), |
| 850 | v.text.size(), |
| 851 | ec); |
| 852 | if(! ec) |
| 853 | TEST_GOOD_ONE_EXT(v.text, po); |
| 854 | else |
| 855 | TEST_BAD_ONE_EXT(v.text, po); |
| 856 | } |
| 857 | else if(v.result == 'y') |
| 858 | TEST_GOOD_ONE_EXT(v.text, po); |
| 859 | else |
| 860 | TEST_BAD_ONE_EXT(v.text, po); |
| 861 | } |
| 862 | } |
| 863 | } |
| 864 | |
| 865 | // https://github.com/boostorg/json/issues/13 |
| 866 | void |
no test coverage detected