Received: from eggs.gnu.org ([2001:4830:134:3::10]:46150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN1be-0007Ce-Tg for qemu-devel@nongnu.org; Mon, 10 Mar 2014 10:55:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WN1bW-0007WU-H6 for qemu-devel@nongnu.org; Mon, 10 Mar 2014 10:55:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN1bW-0007WP-8p for qemu-devel@nongnu.org; Mon, 10 Mar 2014 10:54:58 -0400 From: Markus Armbruster Date: Mon, 10 Mar 2014 15:54:50 +0100 Message-Id: <1394463290-24929-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH] tests/qapi-schema: Fix enum misuse in flat union type tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, lcapitulino@redhat.com Screwed up in commit 2fc0043. Currently harmless, because the enum values happen to be identical. Reported-by: Peter Maydell Signed-off-by: Markus Armbruster --- tests/test-qmp-input-visitor.c | 2 +- tests/test-qmp-output-visitor.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c index 2dffafc..0b9256b 100644 --- a/tests/test-qmp-input-visitor.c +++ b/tests/test-qmp-input-visitor.c @@ -315,7 +315,7 @@ static void test_visitor_in_union_flat(TestInputVisitorData *data, visit_type_UserDefFlatUnion(v, &tmp, NULL, &err); g_assert(err == NULL); - g_assert_cmpint(tmp->kind, ==, USER_DEF_UNION_KIND_A); + g_assert_cmpint(tmp->kind, ==, USER_DEF_FLAT_UNION_KIND_A); /* TODO g_assert_cmpint(tmp->integer, ==, 41); */ g_assert_cmpint(tmp->a->boolean, ==, true); qapi_free_UserDefFlatUnion(tmp); diff --git a/tests/test-qmp-output-visitor.c b/tests/test-qmp-output-visitor.c index 105f4cf..603616a 100644 --- a/tests/test-qmp-output-visitor.c +++ b/tests/test-qmp-output-visitor.c @@ -449,7 +449,7 @@ static void test_visitor_out_union_flat(TestOutputVisitorData *data, Error *err = NULL; UserDefFlatUnion *tmp = g_malloc0(sizeof(UserDefFlatUnion)); - tmp->kind = USER_DEF_UNION_KIND_A; + tmp->kind = USER_DEF_FLAT_UNION_KIND_A; tmp->a = g_malloc0(sizeof(UserDefA)); /* TODO when generator bug is fixed: tmp->integer = 41; */ tmp->a->boolean = true; -- 1.8.1.4