|
|
@@ -23,6 +23,7 @@
|
|
|
|
|
|
#include <assert.h>
|
|
|
#include <string.h>
|
|
|
+#include <stdio.h>
|
|
|
|
|
|
#ifndef TEST_MAIN_PROVIDED
|
|
|
#include <dpkg/ehandle.h>
|
|
|
@@ -37,6 +38,12 @@
|
|
|
* @{
|
|
|
*/
|
|
|
|
|
|
+#define test_bail(reason) \
|
|
|
+ do { \
|
|
|
+ printf("Bail out! %s\n", (reason)); \
|
|
|
+ exit(99); \
|
|
|
+ } while (0)
|
|
|
+
|
|
|
#define test_pass(a) assert((a))
|
|
|
#define test_fail(a) assert(!(a))
|
|
|
#define test_str(a, op, b) assert(strcmp((a), (b)) op 0)
|