X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftally%2Ftest%2Frun-histogram.c;h=2690cebdff9aec5e555298baf92e17f65fcd6a21;hp=8f8bd2ff3aaa8b521213727fe7b197489a2e3c1a;hb=fdea8abee49e9158275741c210bbb27caf6754fa;hpb=1c7178a0a9173ff99a581475d8a9089deadcccb2 diff --git a/ccan/tally/test/run-histogram.c b/ccan/tally/test/run-histogram.c index 8f8bd2ff..2690cebd 100644 --- a/ccan/tally/test/run-histogram.c +++ b/ccan/tally/test/run-histogram.c @@ -8,7 +8,7 @@ int main(void) char *graph, *p; bool trunc; - plan_tests(100 + 1 + 10 + 1 + 100 + 1 + 10 + 1 + 10 + 2 + 1); + plan_tests(100 + 1 + 10 + 1 + 100 + 1 + 10 + 1 + 10 * 2 + 1); /* Uniform distribution, easy. */ tally = tally_new(100); @@ -100,11 +100,16 @@ int main(void) /* Check min/max labels. */ if (i == 0) ok1(strncmp(p, "-5*", 3) == 0); - if (i == 9) + else if (i == 9) ok1(strncmp(p, "4*", 2) == 0); + else if (i == 5) + ok1(p[0] == '+'); /* 0 marker */ + else + ok1(p[0] == '|'); p = eol + 1; } ok1(!*p); + diag("Here's the pretty: %s", graph); free(graph); free(tally);