diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-11-19 06:42:58 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-11-19 07:01:23 +0100 |
commit | 9351b4033bbf0bb1df3d3412376fefe785168c27 (patch) | |
tree | e55585d591711795ff5bcd0665d0eefd9aeda5cb /tests/test-bitset.c | |
parent | 4a959de38cb2daf81cfabccbcbcfeb7ffd28b9c6 (diff) | |
download | gnulib-9351b4033bbf0bb1df3d3412376fefe785168c27.tar.gz |
bitset: tests: exercise the stats too
* tests/test-bitset.c: Display the stats at the end of the test.
* lib/bitset/stats.c (bitset_log_histogram_print): When diplaying the
last bin, display "256-..." rather that "256-511", since the last bin
does count item greater than or equal to 256.
Diffstat (limited to 'tests/test-bitset.c')
-rw-r--r-- | tests/test-bitset.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-bitset.c b/tests/test-bitset.c index 9a2d7c5216..6fa656a227 100644 --- a/tests/test-bitset.c +++ b/tests/test-bitset.c @@ -358,6 +358,8 @@ check_attributes (enum bitset_attr attr, int nbits) int main (void) { + bitset_stats_enable (); + for (int i = 0; i < 4; ++i) { /* table bitsets have elements that store 256 bits. bitset_list @@ -382,5 +384,7 @@ int main (void) compare (BITSET_VARIABLE, BITSET_SPARSE); compare (BITSET_VARIABLE, BITSET_FRUGAL); compare (BITSET_VARIABLE, BITSET_GREEDY); + + bitset_stats_dump (stderr); return 0; } |