| 43 | namespace TestJSONRPC { |
| 44 | |
| 45 | void check_error_code(const Dictionary &p_dict, const JSONRPC::ErrorCode &p_code) { |
| 46 | CHECK(p_dict["jsonrpc"] == "2.0"); |
| 47 | REQUIRE(p_dict.has("error")); |
| 48 | const Dictionary &err_body = p_dict["error"]; |
| 49 | const int &code = err_body["code"]; |
| 50 | CHECK(code == p_code); |
| 51 | } |
| 52 | |
| 53 | void check_invalid(const Dictionary &p_dict) { |
| 54 | check_error_code(p_dict, JSONRPC::INVALID_REQUEST); |
no test coverage detected