From 8168ca8ea3699b9fca4d8c948c7fa6ecdedc4a97 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 22 May 2017 18:42:14 +0200 Subject: tests/qapi-schema: Avoid 'str' in alternate test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Message-Id: <1495471335-23707-4-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Marc-André Lureau --- tests/test-qobject-output-visitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test-qobject-output-visitor.c') diff --git a/tests/test-qobject-output-visitor.c b/tests/test-qobject-output-visitor.c index 94b9518..4e8fdf1 100644 --- a/tests/test-qobject-output-visitor.c +++ b/tests/test-qobject-output-visitor.c @@ -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); -- cgit v1.1