diff options
author | Markus Armbruster <armbru@redhat.com> | 2022-11-04 17:06:47 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2022-12-13 18:31:37 +0100 |
commit | 4b2fc7dbc4203c52b7726249328fcde49626f565 (patch) | |
tree | ec71ce6387f225a02164d68a74a2c01856709b17 /tests/unit/test-qobject-output-visitor.c | |
parent | 44ea9d9be33c8a4cf89132e0dc2b3029733bcaf4 (diff) |
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-qobject-output-visitor.c')
-rw-r--r-- | tests/unit/test-qobject-output-visitor.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/unit/test-qobject-output-visitor.c b/tests/unit/test-qobject-output-visitor.c index 66b27fad66..7f054289fe 100644 --- a/tests/unit/test-qobject-output-visitor.c +++ b/tests/unit/test-qobject-output-visitor.c @@ -182,7 +182,6 @@ static void test_visitor_out_struct_nested(TestOutputVisitorData *data, ud2->dict1->dict2->string = g_strdup(strings[2]); ud2->dict1->dict3 = g_malloc0(sizeof(*ud2->dict1->dict3)); - ud2->dict1->has_dict3 = true; ud2->dict1->dict3->userdef = g_new0(UserDefOne, 1); ud2->dict1->dict3->userdef->string = g_strdup(string); ud2->dict1->dict3->userdef->integer = value; @@ -284,7 +283,6 @@ static void test_visitor_out_list_qapi_free(TestOutputVisitorData *data, value->dict1->dict2->userdef->string = g_strdup(string); value->dict1->dict2->userdef->integer = 42; value->dict1->dict2->string = g_strdup(string); - value->dict1->has_dict3 = false; QAPI_LIST_PREPEND(head, value); } |