aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/test-qmp-event.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2022-11-04 17:06:47 +0100
committerMarkus Armbruster <armbru@redhat.com>2022-12-13 18:31:37 +0100
commit4b2fc7dbc4203c52b7726249328fcde49626f565 (patch)
treeec71ce6387f225a02164d68a74a2c01856709b17 /tests/unit/test-qmp-event.c
parent44ea9d9be33c8a4cf89132e0dc2b3029733bcaf4 (diff)
downloadqemu-4b2fc7dbc4203c52b7726249328fcde49626f565.zip
qemu-4b2fc7dbc4203c52b7726249328fcde49626f565.tar.gz
qemu-4b2fc7dbc4203c52b7726249328fcde49626f565.tar.bz2
qapi tests: Elide redundant has_FOO in generated C
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for tests/qapi-schema/qapi-schema-test.json. Said commit explains the transformation in more detail. The invariant violations mentioned there do not occur here. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20221104160712.3005652-6-armbru@redhat.com>
Diffstat (limited to 'tests/unit/test-qmp-event.c')
-rw-r--r--tests/unit/test-qmp-event.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/test-qmp-event.c b/tests/unit/test-qmp-event.c
index 7d961d7..3626d23 100644
--- a/tests/unit/test-qmp-event.c
+++ b/tests/unit/test-qmp-event.c
@@ -109,7 +109,7 @@ static void test_event_c(TestEventData *data,
data->expect = qdict_from_jsonf_nofail(
"{ 'event': 'EVENT_C', 'data': {"
" 'a': 1, 'b': { 'integer': 2, 'string': 'test1' }, 'c': 'test2' } }");
- qapi_event_send_event_c(true, 1, true, &b, "test2");
+ qapi_event_send_event_c(true, 1, &b, "test2");
g_assert(data->emitted);
qobject_unref(data->expect);
}
@@ -135,7 +135,7 @@ static void test_event_d(TestEventData *data,
" 'struct1': { 'integer': 2, 'string': 'test1', 'enum1': 'value1' },"
" 'string': 'test2', 'enum2': 'value2' },"
" 'b': 'test3', 'enum3': 'value3' } }");
- qapi_event_send_event_d(&a, "test3", false, NULL, true, ENUM_ONE_VALUE3);
+ qapi_event_send_event_d(&a, "test3", NULL, true, ENUM_ONE_VALUE3);
g_assert(data->emitted);
qobject_unref(data->expect);
}