aboutsummaryrefslogtreecommitdiff
path: root/tests/test-qmp-input-strict.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2015-05-04 09:05:11 -0600
committerMarkus Armbruster <armbru@redhat.com>2015-05-05 18:39:00 +0200
commitab045267447d52e63a79c0e18f89ae4411f5420b (patch)
treebe733c614b93d55ead3dd9acfb8dc641ff60f06c /tests/test-qmp-input-strict.c
parent811d04fd0cff1229480d3f5b2e349f646ab6e3c1 (diff)
qapi: Rename anonymous union type in test
Reduce churn in the future patch that replaces anonymous unions with a new metatype 'alternate' by changing 'AnonUnion' to 'Alternate'. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/test-qmp-input-strict.c')
-rw-r--r--tests/test-qmp-input-strict.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/test-qmp-input-strict.c b/tests/test-qmp-input-strict.c
index 486848e952..a5f7bf3c3e 100644
--- a/tests/test-qmp-input-strict.c
+++ b/tests/test-qmp-input-strict.c
@@ -173,18 +173,18 @@ static void test_validate_union_flat(TestInputVisitorData *data,
qapi_free_UserDefFlatUnion(tmp);
}
-static void test_validate_union_anon(TestInputVisitorData *data,
- const void *unused)
+static void test_validate_alternate(TestInputVisitorData *data,
+ const void *unused)
{
- UserDefAnonUnion *tmp = NULL;
+ UserDefAlternate *tmp = NULL;
Visitor *v;
Error *err = NULL;
v = validate_test_init(data, "42");
- visit_type_UserDefAnonUnion(v, &tmp, NULL, &err);
+ visit_type_UserDefAlternate(v, &tmp, NULL, &err);
g_assert(!err);
- qapi_free_UserDefAnonUnion(tmp);
+ qapi_free_UserDefAlternate(tmp);
}
static void test_validate_fail_struct(TestInputVisitorData *data,
@@ -276,18 +276,18 @@ static void test_validate_fail_union_flat_no_discrim(TestInputVisitorData *data,
qapi_free_UserDefFlatUnion2(tmp);
}
-static void test_validate_fail_union_anon(TestInputVisitorData *data,
- const void *unused)
+static void test_validate_fail_alternate(TestInputVisitorData *data,
+ const void *unused)
{
- UserDefAnonUnion *tmp = NULL;
+ UserDefAlternate *tmp = NULL;
Visitor *v;
Error *err = NULL;
v = validate_test_init(data, "3.14");
- visit_type_UserDefAnonUnion(v, &tmp, NULL, &err);
+ visit_type_UserDefAlternate(v, &tmp, NULL, &err);
g_assert(err);
- qapi_free_UserDefAnonUnion(tmp);
+ qapi_free_UserDefAlternate(tmp);
}
static void validate_test_add(const char *testpath,
@@ -312,8 +312,8 @@ int main(int argc, char **argv)
&testdata, test_validate_list);
validate_test_add("/visitor/input-strict/pass/union-flat",
&testdata, test_validate_union_flat);
- validate_test_add("/visitor/input-strict/pass/union-anon",
- &testdata, test_validate_union_anon);
+ validate_test_add("/visitor/input-strict/pass/alternate",
+ &testdata, test_validate_alternate);
validate_test_add("/visitor/input-strict/pass/union-native-list",
&testdata, test_validate_union_native_list);
validate_test_add("/visitor/input-strict/fail/struct",
@@ -326,8 +326,8 @@ int main(int argc, char **argv)
&testdata, test_validate_fail_union_flat);
validate_test_add("/visitor/input-strict/fail/union-flat-no-discriminator",
&testdata, test_validate_fail_union_flat_no_discrim);
- validate_test_add("/visitor/input-strict/fail/union-anon",
- &testdata, test_validate_fail_union_anon);
+ validate_test_add("/visitor/input-strict/fail/alternate",
+ &testdata, test_validate_fail_alternate);
validate_test_add("/visitor/input-strict/fail/union-native-list",
&testdata, test_validate_fail_union_native_list);