MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / check_error_code

Function check_error_code

modules/jsonrpc/tests/test_jsonrpc.cpp:45–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43namespace TestJSONRPC {
44
45void 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
53void check_invalid(const Dictionary &p_dict) {
54 check_error_code(p_dict, JSONRPC::INVALID_REQUEST);

Callers 2

check_invalidFunction · 0.85
check_error_no_methodFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected