diff options
| author | William Casarin <jb55@jb55.com> | 2018-07-09 22:28:25 -0700 |
|---|---|---|
| committer | William Casarin <jb55@jb55.com> | 2018-07-09 22:31:48 -0700 |
| commit | 9593fc545950782ed75f12f53238b07885559b2b (patch) | |
| tree | 9c7c2f7cbb427c54e9184cb61eedce737a6cbc6f /ccan/tal/test/run-array.c | |
| parent | bd8c223756d2f912526ecef53bae0cc8e0c63442 (diff) | |
remove ccan for now
Diffstat (limited to 'ccan/tal/test/run-array.c')
| -rw-r--r-- | ccan/tal/test/run-array.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/ccan/tal/test/run-array.c b/ccan/tal/test/run-array.c deleted file mode 100644 index 5cab66e..0000000 --- a/ccan/tal/test/run-array.c +++ /dev/null @@ -1,48 +0,0 @@ -#include <ccan/tal/tal.h> -#include <ccan/tal/tal.c> -#include <ccan/tap/tap.h> - -int main(void) -{ - char *parent, *c[4]; - int i; - - plan_tests(11); - - parent = tal(NULL, char); - ok1(parent); - - /* Zeroing allocations. */ - for (i = 0; i < 4; i++) { - c[i] = talz(parent, char); - ok1(*c[i] == '\0'); - tal_free(c[i]); - } - - /* Array allocation. */ - for (i = 0; i < 4; i++) { - c[i] = tal_arr(parent, char, 4); - strcpy(c[i], "abc"); - tal_free(c[i]); - } - - /* Zeroing array allocation. */ - for (i = 0; i < 4; i++) { - c[i] = tal_arrz(parent, char, 4); - ok1(!c[i][0] && !c[i][1] && !c[i][2] && !c[i][3]); - strcpy(c[i], "abc"); - tal_free(c[i]); - } - - /* Resizing. */ - c[0] = tal_arrz(parent, char, 4); - ok1(tal_resize(&c[0], 6)); - strcpy(c[0], "hello"); - tal_free(c[0]); - ok1(tal_first(parent) == NULL); - - tal_free(parent); - - tal_cleanup(); - return exit_status(); -} |
