1 #include <ccan/tally/tally.c>
2 #include <ccan/tap/tap.h>
6 struct tally *tally = tally_new(2);
13 /* This renormalize should do nothing. */
14 renormalize(tally, 0, 1);
15 ok1(tally->counts[0] == 1);
16 ok1(tally->counts[1] == 0);
19 /* This renormalize should collapse both into bucket 0. */
20 renormalize(tally, 0, 3);
21 ok1(tally->counts[0] == 2);
22 ok1(tally->counts[1] == 0);