JSONRPC: Require manual method registration
This commit is contained in:
parent
d52b84e472
commit
e2c3731cdd
11 changed files with 124 additions and 43 deletions
|
|
@ -60,20 +60,17 @@ TEST_CASE("[JSONRPC] process_string invalid") {
|
|||
}
|
||||
|
||||
class TestClassJSONRPC : public JSONRPC {
|
||||
GDCLASS(TestClassJSONRPC, JSONRPC)
|
||||
|
||||
public:
|
||||
String something(const String &p_in);
|
||||
TestClassJSONRPC() {
|
||||
set_method("something", callable_mp(this, &TestClassJSONRPC::something));
|
||||
}
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
String something(const String &p_in);
|
||||
};
|
||||
|
||||
void test_process_action(const Variant &p_in, const Variant &p_expected, bool p_process_array_elements = false);
|
||||
|
||||
TEST_CASE("[JSONRPC] process_action Dictionary") {
|
||||
ClassDB::register_class<TestClassJSONRPC>();
|
||||
|
||||
Dictionary in_dict = Dictionary();
|
||||
in_dict["method"] = "something";
|
||||
in_dict["id"] = "ID";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue