summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael S. Tsirkin2014-06-18 16:52:52 +0200
committerMichael S. Tsirkin2014-06-19 17:44:22 +0200
commit6ffa1695769d0227e28715f7e77cdc49aeab1b8c (patch)
tree3546a9d235348b72a0f693c69948e831ef8c817b
parentqapi: fix input visitor bugs (diff)
downloadqemu-6ffa1695769d0227e28715f7e77cdc49aeab1b8c.tar.gz
qemu-6ffa1695769d0227e28715f7e77cdc49aeab1b8c.tar.xz
qemu-6ffa1695769d0227e28715f7e77cdc49aeab1b8c.zip
tests: simplify code
Use error_abort instead of open-coded assert. Cleaner and shorter. Reported-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
-rw-r--r--tests/test-string-input-visitor.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor.c
index b01e2f2b79..8e3433e0c7 100644
--- a/tests/test-string-input-visitor.c
+++ b/tests/test-string-input-visitor.c
@@ -69,14 +69,12 @@ static void test_visitor_in_intList(TestInputVisitorData *data,
{
int64_t value[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20};
int16List *res = NULL, *tmp;
- Error *errp = NULL;
Visitor *v;
int i = 0;
v = visitor_input_test_init(data, "1,2,0,2-4,20,5-9,1-8");
- visit_type_int16List(v, &res, NULL, &errp);
- g_assert(errp == NULL);
+ visit_type_int16List(v, &res, NULL, &error_abort);
tmp = res;
while (i < sizeof(value) / sizeof(value[0])) {
g_assert(tmp);