aboutsummaryrefslogtreecommitdiff
path: root/tests/test-string-input-visitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-05-02 13:26:29 +0200
committerLuiz Capitulino <lcapitulino@redhat.com>2014-05-08 14:20:00 -0400
commite940f543ae7606819c9083fdb524e5b85914f032 (patch)
tree41a016f0ee62766627165bd1563b7994c723ec9a /tests/test-string-input-visitor.c
parent636713bad4240836947c04c26e1cd001d3bcbff1 (diff)
qmp hmp: Consistently name Error * objects err, and not errp
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'tests/test-string-input-visitor.c')
-rw-r--r--tests/test-string-input-visitor.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor.c
index d406263aee..877e737714 100644
--- a/tests/test-string-input-visitor.c
+++ b/tests/test-string-input-visitor.c
@@ -54,62 +54,62 @@ 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, "-42");
- 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);
}
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);
visitor_input_teardown(data, unused);
v = visitor_input_test_init(data, "yes");
- 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);
visitor_input_teardown(data, unused);
v = visitor_input_test_init(data, "on");
- 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);
visitor_input_teardown(data, unused);
v = visitor_input_test_init(data, "false");
- visit_type_bool(v, &res, NULL, &errp);
- g_assert(!errp);
+ visit_type_bool(v, &res, NULL, &err);
+ g_assert(!err);
g_assert_cmpint(res, ==, false);
visitor_input_teardown(data, unused);
v = visitor_input_test_init(data, "no");
- visit_type_bool(v, &res, NULL, &errp);
- g_assert(!errp);
+ visit_type_bool(v, &res, NULL, &err);
+ g_assert(!err);
g_assert_cmpint(res, ==, false);
visitor_input_teardown(data, unused);
v = visitor_input_test_init(data, "off");
- visit_type_bool(v, &res, NULL, &errp);
- g_assert(!errp);
+ visit_type_bool(v, &res, NULL, &err);
+ g_assert(!err);
g_assert_cmpint(res, ==, false);
}
@@ -117,13 +117,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, "3.14");
- 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);
}
@@ -131,13 +131,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, 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);
@@ -146,7 +146,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;
@@ -155,8 +155,8 @@ static void test_visitor_in_enum(TestInputVisitorData *data,
v = visitor_input_test_init(data, 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);