tests: Use error_free_or_abort() where appropriate

Replace

    g_assert(err != NULL);
    error_free(err);
    err = NULL;

and variations thereof by

    error_free_or_abort(&err);

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200630090351.1247703-6-armbru@redhat.com>
This commit is contained in:
Markus Armbruster 2020-06-30 11:03:30 +02:00
parent d8da9e71b6
commit 7b8eb7f848
7 changed files with 14 additions and 39 deletions

View file

@ -54,10 +54,9 @@ static void test_base64_bad(const char *input,
&len,
&err);
g_assert(err != NULL);
error_free_or_abort(&err);
g_assert(actual == NULL);
g_assert_cmpint(len, ==, 0);
error_free(err);
}