X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=tests%2Ftest-qmp-commands.c;h=ac3fd039e0fbf5e3ddcc4069db33dc0856d3573e;hb=3f308bf3acc724d50ffa3f280f75f4c7b5bb6003;hp=0f81a98be297de378e90121d23c72821f0a2019a;hpb=21047240d01ac8a8b90f65b8bc41b289ee3ba6ff;p=mirror_qemu.git diff --git a/tests/test-qmp-commands.c b/tests/test-qmp-commands.c index 0f81a98be2..ac3fd039e0 100644 --- a/tests/test-qmp-commands.c +++ b/tests/test-qmp-commands.c @@ -94,7 +94,7 @@ static void test_dispatch_cmd(void) QDict *req = qdict_new(); QObject *resp; - qdict_put_obj(req, "execute", QOBJECT(qstring_from_str("user_def_cmd"))); + qdict_put(req, "execute", qstring_from_str("user_def_cmd")); resp = qmp_dispatch(&qmp_commands, QOBJECT(req)); assert(resp != NULL); @@ -111,7 +111,7 @@ static void test_dispatch_cmd_failure(void) QDict *args = qdict_new(); QObject *resp; - qdict_put_obj(req, "execute", QOBJECT(qstring_from_str("user_def_cmd2"))); + qdict_put(req, "execute", qstring_from_str("user_def_cmd2")); resp = qmp_dispatch(&qmp_commands, QOBJECT(req)); assert(resp != NULL); @@ -125,7 +125,7 @@ static void test_dispatch_cmd_failure(void) qdict_put(args, "a", qint_from_int(66)); qdict_put(req, "arguments", args); - qdict_put_obj(req, "execute", QOBJECT(qstring_from_str("user_def_cmd"))); + qdict_put(req, "execute", qstring_from_str("user_def_cmd")); resp = qmp_dispatch(&qmp_commands, QOBJECT(req)); assert(resp != NULL); @@ -164,14 +164,14 @@ static void test_dispatch_cmd_io(void) QDict *ret_dict_dict2, *ret_dict_dict2_userdef; QInt *ret3; - qdict_put_obj(ud1a, "integer", QOBJECT(qint_from_int(42))); - qdict_put_obj(ud1a, "string", QOBJECT(qstring_from_str("hello"))); - qdict_put_obj(ud1b, "integer", QOBJECT(qint_from_int(422))); - qdict_put_obj(ud1b, "string", QOBJECT(qstring_from_str("hello2"))); - qdict_put_obj(args, "ud1a", QOBJECT(ud1a)); - qdict_put_obj(args, "ud1b", QOBJECT(ud1b)); - qdict_put_obj(req, "arguments", QOBJECT(args)); - qdict_put_obj(req, "execute", QOBJECT(qstring_from_str("user_def_cmd2"))); + qdict_put(ud1a, "integer", qint_from_int(42)); + qdict_put(ud1a, "string", qstring_from_str("hello")); + qdict_put(ud1b, "integer", qint_from_int(422)); + qdict_put(ud1b, "string", qstring_from_str("hello2")); + qdict_put(args, "ud1a", ud1a); + qdict_put(args, "ud1b", ud1b); + qdict_put(req, "arguments", args); + qdict_put(req, "execute", qstring_from_str("user_def_cmd2")); ret = qobject_to_qdict(test_qmp_dispatch(req)); @@ -244,7 +244,7 @@ static void test_dealloc_partial(void) Visitor *v; ud2_dict = qdict_new(); - qdict_put_obj(ud2_dict, "string0", QOBJECT(qstring_from_str(text))); + qdict_put(ud2_dict, "string0", qstring_from_str(text)); v = qobject_input_visitor_new(QOBJECT(ud2_dict)); visit_type_UserDefTwo(v, NULL, &ud2, &err);