There are no real users of this case, and it's going to be invalid after merging of QFloat and QInt use the same QNum type in the following patch.
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- tests/test-keyval.c | 3 --- tests/test-qobject-input-visitor.c | 26 -------------------------- tests/qapi-schema/qapi-schema-test.json | 2 -- tests/qapi-schema/qapi-schema-test.out | 8 -------- 4 files changed, 39 deletions(-) diff --git a/tests/test-keyval.c b/tests/test-keyval.c index c556b1b117..df0ff831b5 100644 --- a/tests/test-keyval.c +++ b/tests/test-keyval.c @@ -615,7 +615,6 @@ static void test_keyval_visit_alternate(void) Visitor *v; QDict *qdict; AltNumStr *ans; - AltNumInt *ani; /* * Can't do scalar alternate variants other than string. You get @@ -629,8 +628,6 @@ static void test_keyval_visit_alternate(void) g_assert_cmpint(ans->type, ==, QTYPE_QSTRING); g_assert_cmpstr(ans->u.s, ==, "1"); qapi_free_AltNumStr(ans); - visit_type_AltNumInt(v, "a", &ani, &err); - error_free_or_abort(&err); visit_end_struct(v, NULL); visit_free(v); } diff --git a/tests/test-qobject-input-visitor.c b/tests/test-qobject-input-visitor.c index f965743b6e..a30e2d5e95 100644 --- a/tests/test-qobject-input-visitor.c +++ b/tests/test-qobject-input-visitor.c @@ -586,8 +586,6 @@ static void test_visitor_in_alternate_number(TestInputVisitorData *data, AltStrNum *asn; AltNumStr *ans; AltStrInt *asi; - AltIntNum *ain; - AltNumInt *ani; /* Parsing an int */ @@ -614,18 +612,6 @@ static void test_visitor_in_alternate_number(TestInputVisitorData *data, g_assert_cmpint(asi->u.i, ==, 42); qapi_free_AltStrInt(asi); - v = visitor_input_test_init(data, "42"); - visit_type_AltIntNum(v, NULL, &ain, &error_abort); - g_assert_cmpint(ain->type, ==, QTYPE_QINT); - g_assert_cmpint(ain->u.i, ==, 42); - qapi_free_AltIntNum(ain); - - v = visitor_input_test_init(data, "42"); - visit_type_AltNumInt(v, NULL, &ani, &error_abort); - g_assert_cmpint(ani->type, ==, QTYPE_QINT); - g_assert_cmpint(ani->u.i, ==, 42); - qapi_free_AltNumInt(ani); - /* Parsing a double */ v = visitor_input_test_init(data, "42.5"); @@ -649,18 +635,6 @@ static void test_visitor_in_alternate_number(TestInputVisitorData *data, visit_type_AltStrInt(v, NULL, &asi, &err); error_free_or_abort(&err); qapi_free_AltStrInt(asi); - - v = visitor_input_test_init(data, "42.5"); - visit_type_AltIntNum(v, NULL, &ain, &error_abort); - g_assert_cmpint(ain->type, ==, QTYPE_QFLOAT); - g_assert_cmpfloat(ain->u.n, ==, 42.5); - qapi_free_AltIntNum(ain); - - v = visitor_input_test_init(data, "42.5"); - visit_type_AltNumInt(v, NULL, &ani, &error_abort); - g_assert_cmpint(ani->type, ==, QTYPE_QFLOAT); - g_assert_cmpfloat(ani->u.n, ==, 42.5); - qapi_free_AltNumInt(ani); } static void test_native_list_integer_helper(TestInputVisitorData *data, diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json index 842ea3c5e3..9ad09e3758 100644 --- a/tests/qapi-schema/qapi-schema-test.json +++ b/tests/qapi-schema/qapi-schema-test.json @@ -103,8 +103,6 @@ { 'alternate': 'AltStrNum', 'data': { 's': 'str', 'n': 'number' } } { 'alternate': 'AltNumStr', 'data': { 'n': 'number', 's': 'str' } } { 'alternate': 'AltStrInt', 'data': { 's': 'str', 'i': 'int' } } -{ 'alternate': 'AltIntNum', 'data': { 'i': 'int', 'n': 'number' } } -{ 'alternate': 'AltNumInt', 'data': { 'n': 'number', 'i': 'int' } } # for testing native lists { 'union': 'UserDefNativeListUnion', diff --git a/tests/qapi-schema/qapi-schema-test.out b/tests/qapi-schema/qapi-schema-test.out index 9d99c4eebb..5c6655a5c3 100644 --- a/tests/qapi-schema/qapi-schema-test.out +++ b/tests/qapi-schema/qapi-schema-test.out @@ -1,11 +1,3 @@ -alternate AltIntNum - tag type - case i: int - case n: number -alternate AltNumInt - tag type - case n: number - case i: int alternate AltNumStr tag type case n: number -- 2.13.0.rc1.16.gd80b50c3f