From 7ad993b480d3f4f1261d3374516effd9bff20bc6 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 1 Mar 2014 08:40:32 +0100 Subject: tests/qapi-schema: Cover union types with base Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- tests/test-qmp-input-strict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test-qmp-input-strict.c') diff --git a/tests/test-qmp-input-strict.c b/tests/test-qmp-input-strict.c index 67adc2ab2c..9b99b48e87 100644 --- a/tests/test-qmp-input-strict.c +++ b/tests/test-qmp-input-strict.c @@ -132,7 +132,7 @@ static void test_validate_union(TestInputVisitorData *data, Visitor *v; Error *errp = NULL; - v = validate_test_init(data, "{ 'type': 'b', 'data' : { 'integer': 42 } }"); + v = validate_test_init(data, "{ 'type': 'b', 'integer': 41, 'data' : { 'integer': 42 } }"); visit_type_UserDefUnion(v, &tmp, NULL, &errp); g_assert(!errp); @@ -205,7 +205,7 @@ static void test_validate_fail_union(TestInputVisitorData *data, Error *errp = NULL; Visitor *v; - v = validate_test_init(data, "{ 'type': 'b', 'data' : { 'integer': 42 }, 'extra': 'yyy' }"); + v = validate_test_init(data, "{ 'type': 'b', 'data' : { 'integer': 42 } }"); visit_type_UserDefUnion(v, &tmp, NULL, &errp); g_assert(errp); -- cgit v1.2.1