projects
/
qemu-gpiodev
/
libgpiod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
114e0dc
)
tests: add new assertion
author
Bartosz Golaszewski
<bartekgola@gmail.com>
Fri, 5 May 2017 17:20:28 +0000
(19:20 +0200)
committer
Bartosz Golaszewski
<bartekgola@gmail.com>
Fri, 5 May 2017 17:20:28 +0000
(19:20 +0200)
GU_ASSERT_FALSE() checks if given statement evaluates to false.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests/unit/gpiod-unit.h
patch
|
blob
|
history
diff --git
a/tests/unit/gpiod-unit.h
b/tests/unit/gpiod-unit.h
index 343a70b01d8196916fb8f685b035810bd3ddbe66..a1883e0bf440d0538d99c1756d1628661d4e232a 100644
(file)
--- 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)