X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fstr%2Ftest%2Frun.c;h=a9dacab051e9f28e7601df2778842529ba35e3fa;hp=b55444a15b595f25250d9de4172187d9fbea675a;hb=ab43c3d0de45ba1012b4e3ff669517f78cac6092;hpb=0018a89106977814194a442e6219ef400ebfb35d diff --git a/ccan/str/test/run.c b/ccan/str/test/run.c index b55444a1..a9dacab0 100644 --- a/ccan/str/test/run.c +++ b/ccan/str/test/run.c @@ -1,7 +1,7 @@ -#include "str/str.h" +#include #include #include -#include "tap/tap.h" +#include /* FIXME: ccanize */ #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) @@ -35,7 +35,7 @@ int main(int argc, char *argv[]) } } - plan_tests(n * n * 5); + plan_tests(n * n * 5 + 3); for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { unsigned int k, identical = 0; @@ -76,5 +76,11 @@ int main(int argc, char *argv[]) } } + ok1(streq(stringify(NUM_SUBSTRINGS), + "((sizeof(substrings) / sizeof(substrings[0])) - 1)")); + ok1(streq(stringify(ARRAY_SIZE(substrings)), + "(sizeof(substrings) / sizeof(substrings[0]))")); + ok1(streq(stringify(i == 0), "i == 0")); + return exit_status(); }