From: Bartosz Golaszewski Date: Fri, 5 May 2017 17:20:28 +0000 (+0200) Subject: tests: add new assertion X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9672e7ebe34422614cb38b0aaabb37d95677087e;p=qemu-gpiodev%2Flibgpiod.git tests: add new assertion GU_ASSERT_FALSE() checks if given statement evaluates to false. Signed-off-by: Bartosz Golaszewski --- diff --git a/tests/unit/gpiod-unit.h b/tests/unit/gpiod-unit.h index 343a70b..a1883e0 100644 --- a/tests/unit/gpiod-unit.h +++ b/tests/unit/gpiod-unit.h @@ -126,6 +126,7 @@ void gu_free_chip_iter_noclose(struct gpiod_chip_iter **iter); } \ } while (0) +#define GU_ASSERT_FALSE(statement) GU_ASSERT(!(statement)) #define GU_ASSERT_NOT_NULL(ptr) GU_ASSERT(ptr != NULL) #define GU_ASSERT_RET_OK(status) GU_ASSERT(status == 0) #define GU_ASSERT_NULL(ptr) GU_ASSERT(ptr == NULL)