| 111 | namespace { |
| 112 | |
| 113 | void compare_match(jsoncons::json& doc, |
| 114 | const std::string& path, |
| 115 | const std::string& value) |
| 116 | { |
| 117 | auto result = jsoncons::jsonpath::json_query(doc, path); |
| 118 | CHECK_FALSE(result.empty()); // must match //-V521 |
| 119 | CHECK_FALSE(result.size() > 1); // too many matches //-V521 |
| 120 | |
| 121 | auto matched_value = result[0].as<std::string>(); |
| 122 | CHECK(value == matched_value); //-V521 |
| 123 | } |
| 124 | |
| 125 | } // namespace |
| 126 |
no test coverage detected