summaryrefslogtreecommitdiff
path: root/ccan/take/test/run-debug.c
diff options
context:
space:
mode:
authorWilliam Casarin <jb55@jb55.com>2018-07-09 22:28:25 -0700
committerWilliam Casarin <jb55@jb55.com>2018-07-09 22:31:48 -0700
commit9593fc545950782ed75f12f53238b07885559b2b (patch)
tree9c7c2f7cbb427c54e9184cb61eedce737a6cbc6f /ccan/take/test/run-debug.c
parentbd8c223756d2f912526ecef53bae0cc8e0c63442 (diff)
remove ccan for now
Diffstat (limited to 'ccan/take/test/run-debug.c')
-rw-r--r--ccan/take/test/run-debug.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/ccan/take/test/run-debug.c b/ccan/take/test/run-debug.c
deleted file mode 100644
index a9dda6e..0000000
--- a/ccan/take/test/run-debug.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <stdlib.h>
-#include <stdbool.h>
-
-#define CCAN_TAKE_DEBUG 1
-#include <ccan/take/take.h>
-#include <ccan/take/take.c>
-#include <ccan/tap/tap.h>
-
-int main(void)
-{
- const char *p = "hi";
-
- plan_tests(14);
-
- /* We can take NULL. */
- ok1(take(NULL) == NULL);
- ok1(is_taken(NULL));
- ok1(strstr(taken_any(), "run-debug.c:16:"));
- ok1(taken(NULL)); /* Undoes take() */
- ok1(!is_taken(NULL));
- ok1(!taken(NULL));
- ok1(!taken_any());
-
- /* We can take a real pointer. */
- ok1(take(p) == p);
- ok1(is_taken(p));
- ok1(strends(taken_any(), "run-debug.c:25:p"));
- ok1(taken(p)); /* Undoes take() */
- ok1(!is_taken(p));
- ok1(!taken(p));
- ok1(!taken_any());
-
- return exit_status();
-}