]> git.ipfire.org Git - pakfire.git/commitdiff
testsuite: Fix broken assertion check
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 5 Oct 2021 13:20:12 +0000 (13:20 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 5 Oct 2021 13:20:12 +0000 (13:20 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/testsuite.h

index 713e1b5a285193dffa93a0a01a72394d5ae8b433..f4e87cc0289b0bbfc31de172e305d85aa612f0aa 100644 (file)
@@ -84,7 +84,7 @@ int testsuite_run();
 
 #define ASSERT_FAILURE(expr) \
        do { \
-               if ((expr) > 0) { \
+               if (!(expr)) { \
                        LOG_ERROR("Failed assertion: " #expr " unexpectedly didn't fail in %s:%d %s\n", \
                                __FILE__, __LINE__, __PRETTY_FUNCTION__); \
                        goto FAIL; \