mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
tests/qapi-schema: Avoid 'str' in alternate test cases
The next commit is going to make alternate members of type 'str' conflict with other scalar types. Would break a few test cases that don't actually require 'str'. Flip them from 'str' to 'bool' or 'EnumOne'. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1495471335-23707-4-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
8339fa266c
commit
8168ca8ea3
10 changed files with 68 additions and 64 deletions
|
@ -406,12 +406,12 @@ static void test_visitor_out_alternate(TestOutputVisitorData *data,
|
|||
visitor_reset(data);
|
||||
tmp = g_new0(UserDefAlternate, 1);
|
||||
tmp->type = QTYPE_QSTRING;
|
||||
tmp->u.s = g_strdup("hello");
|
||||
tmp->u.e = ENUM_ONE_VALUE1;
|
||||
|
||||
visit_type_UserDefAlternate(data->ov, NULL, &tmp, &error_abort);
|
||||
qstr = qobject_to_qstring(visitor_get(data));
|
||||
g_assert(qstr);
|
||||
g_assert_cmpstr(qstring_get_str(qstr), ==, "hello");
|
||||
g_assert_cmpstr(qstring_get_str(qstr), ==, "value1");
|
||||
|
||||
qapi_free_UserDefAlternate(tmp);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue