Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
tests/test-qapi-util.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/test-qapi-util.c b/tests/test-qapi-util.c
index 374fa30078..fe232ef9ed 100644
--- a/tests/test-qapi-util.c
+++ b/tests/test-qapi-util.c
@@ -77,25 +77,25 @@ static void test_parse_qapi_name(void)
static void successfn(Error **errp)
{
- g_assert(!errp || !*errp);
+ g_assert(ERR_IS_IGNORED(errp) || !ERR_IS_SET(errp));
}
static void fail1(Error **errp)
{
- g_assert(!errp || !*errp);
+ g_assert(ERR_IS_IGNORED(errp) || !ERR_IS_SET(errp));
error_setg(errp, "error1");
- g_assert(!errp || *errp);
+ g_assert(ERR_IS_IGNORED(errp) || ERR_IS_SET(errp));
}
static void fail2(Error **errp)
{
- g_assert(!errp || !*errp);
+ g_assert(ERR_IS_IGNORED(errp) || !ERR_IS_SET(errp));
error_setg(errp, "error2");
- g_assert(!errp || *errp);
+ g_assert(ERR_IS_IGNORED(errp) || ERR_IS_SET(errp));
}
static void multifn(Error **errp)
@@ -124,13 +124,13 @@ static void test_propagate(void (*fn)(Error **), Error **errp)
bool failed;
Error *local_err = NULL;
- g_assert(!errp || !*errp);
+ g_assert(ERR_IS_IGNORED(errp) || !ERR_IS_SET(errp));
fn(&local_err);
failed = !!local_err;
error_propagate(errp, local_err);
- g_assert(!errp || (failed == !!*errp));
+ g_assert(ERR_IS_IGNORED(errp) || (failed == !!ERR_IS_SET(errp)));
}
static void test_error_api(void)
--
2.11.0.259.g40922b1