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>
This commit is contained in:
Markus Armbruster 2022-11-04 17:06:47 +01:00
parent 44ea9d9be3
commit 4b2fc7dbc4
7 changed files with 18 additions and 25 deletions

View file

@ -431,7 +431,7 @@ static void test_visitor_in_struct_nested(TestInputVisitorData *data,
g_assert_cmpint(udp->dict1->dict2->userdef->integer, ==, 42);
g_assert_cmpstr(udp->dict1->dict2->userdef->string, ==, "string");
g_assert_cmpstr(udp->dict1->dict2->string, ==, "string2");
g_assert(udp->dict1->has_dict3 == false);
g_assert(!udp->dict1->dict3);
}
static void test_visitor_in_list(TestInputVisitorData *data,