1 #include <ccan/tal/tal.h>
2 #include <ccan/tal/tal.c>
3 #include <ccan/tap/tap.h>
5 static int error_count;
7 static void my_error(const char *msg)
10 ok1(strstr(msg, "overflow"));
19 tal_set_backend(NULL, NULL, NULL, my_error);
21 p = tal_arr(NULL, int, (size_t)-1);
23 ok1(error_count == 1);
25 p = tal_arr(NULL, char, (size_t)-2);
27 ok1(error_count == 2);