diff options
Diffstat (limited to 'tests/test-qmp-input-visitor.c')
-rw-r--r-- | tests/test-qmp-input-visitor.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c index 1729667a6f..1ebafc5be2 100644 --- a/tests/test-qmp-input-visitor.c +++ b/tests/test-qmp-input-visitor.c @@ -90,13 +90,13 @@ static void test_visitor_in_int(TestInputVisitorData *data, const void *unused) { int64_t res = 0, value = -42; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = visitor_input_test_init(data, "%" PRId64, value); - visit_type_int(v, &res, NULL, &errp); - g_assert(!errp); + visit_type_int(v, &res, NULL, &err); + g_assert(!err); g_assert_cmpint(res, ==, value); } @@ -104,7 +104,7 @@ static void test_visitor_in_int_overflow(TestInputVisitorData *data, const void *unused) { int64_t res = 0; - Error *errp = NULL; + Error *err = NULL; Visitor *v; /* this will overflow a Qint/int64, so should be deserialized into @@ -113,22 +113,22 @@ static void test_visitor_in_int_overflow(TestInputVisitorData *data, */ v = visitor_input_test_init(data, "%f", DBL_MAX); - visit_type_int(v, &res, NULL, &errp); - g_assert(errp); - error_free(errp); + visit_type_int(v, &res, NULL, &err); + g_assert(err); + error_free(err); } static void test_visitor_in_bool(TestInputVisitorData *data, const void *unused) { - Error *errp = NULL; + Error *err = NULL; bool res = false; Visitor *v; v = visitor_input_test_init(data, "true"); - visit_type_bool(v, &res, NULL, &errp); - g_assert(!errp); + visit_type_bool(v, &res, NULL, &err); + g_assert(!err); g_assert_cmpint(res, ==, true); } @@ -136,13 +136,13 @@ static void test_visitor_in_number(TestInputVisitorData *data, const void *unused) { double res = 0, value = 3.14; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = visitor_input_test_init(data, "%f", value); - visit_type_number(v, &res, NULL, &errp); - g_assert(!errp); + visit_type_number(v, &res, NULL, &err); + g_assert(!err); g_assert_cmpfloat(res, ==, value); } @@ -150,13 +150,13 @@ static void test_visitor_in_string(TestInputVisitorData *data, const void *unused) { char *res = NULL, *value = (char *) "Q E M U"; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = visitor_input_test_init(data, "%s", value); - visit_type_str(v, &res, NULL, &errp); - g_assert(!errp); + visit_type_str(v, &res, NULL, &err); + g_assert(!err); g_assert_cmpstr(res, ==, value); g_free(res); @@ -165,7 +165,7 @@ static void test_visitor_in_string(TestInputVisitorData *data, static void test_visitor_in_enum(TestInputVisitorData *data, const void *unused) { - Error *errp = NULL; + Error *err = NULL; Visitor *v; EnumOne i; @@ -174,8 +174,8 @@ static void test_visitor_in_enum(TestInputVisitorData *data, v = visitor_input_test_init(data, "%s", EnumOne_lookup[i]); - visit_type_EnumOne(v, &res, NULL, &errp); - g_assert(!errp); + visit_type_EnumOne(v, &res, NULL, &err); + g_assert(!err); g_assert_cmpint(i, ==, res); visitor_input_teardown(data, NULL); @@ -217,13 +217,13 @@ static void test_visitor_in_struct(TestInputVisitorData *data, const void *unused) { TestStruct *p = NULL; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = visitor_input_test_init(data, "{ 'integer': -42, 'boolean': true, 'string': 'foo' }"); - visit_type_TestStruct(v, &p, NULL, &errp); - g_assert(!errp); + visit_type_TestStruct(v, &p, NULL, &err); + g_assert(!err); g_assert_cmpint(p->integer, ==, -42); g_assert(p->boolean == true); g_assert_cmpstr(p->string, ==, "foo"); @@ -242,13 +242,13 @@ static void test_visitor_in_struct_nested(TestInputVisitorData *data, const void *unused) { UserDefNested *udp = NULL; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = visitor_input_test_init(data, "{ 'string0': 'string0', 'dict1': { 'string1': 'string1', 'dict2': { 'userdef1': { 'integer': 42, 'string': 'string' }, 'string2': 'string2'}}}"); - visit_type_UserDefNested(v, &udp, NULL, &errp); - g_assert(!errp); + visit_type_UserDefNested(v, &udp, NULL, &err); + g_assert(!err); check_and_free_str(udp->string0, "string0"); check_and_free_str(udp->dict1.string1, "string1"); @@ -265,14 +265,14 @@ static void test_visitor_in_list(TestInputVisitorData *data, const void *unused) { UserDefOneList *item, *head = NULL; - Error *errp = NULL; + Error *err = NULL; Visitor *v; int i; v = visitor_input_test_init(data, "[ { 'string': 'string0', 'integer': 42 }, { 'string': 'string1', 'integer': 43 }, { 'string': 'string2', 'integer': 44 } ]"); - visit_type_UserDefOneList(v, &head, NULL, &errp); - g_assert(!errp); + visit_type_UserDefOneList(v, &head, NULL, &err); + g_assert(!err); g_assert(head != NULL); for (i = 0, item = head; item; item = item->next, i++) { @@ -634,16 +634,16 @@ static void test_visitor_in_errors(TestInputVisitorData *data, const void *unused) { TestStruct *p = NULL; - Error *errp = NULL; + Error *err = NULL; Visitor *v; v = visitor_input_test_init(data, "{ 'integer': false, 'boolean': 'foo', 'string': -42 }"); - visit_type_TestStruct(v, &p, NULL, &errp); - g_assert(errp); + visit_type_TestStruct(v, &p, NULL, &err); + g_assert(err); g_assert(p->string == NULL); - error_free(errp); + error_free(err); g_free(p->string); g_free(p); } |