diff options
author | devzero2000 <devzero2000> | 2010-10-27 16:10:04 +0000 |
---|---|---|
committer | devzero2000 <devzero2000> | 2010-10-27 16:10:04 +0000 |
commit | 196149b57a9edebb3aeaf31f0ea8bfcbb9dd764b (patch) | |
tree | 4f4119e1354c4d48691b165429398d8ea95742f5 /tdict.c | |
parent | 06f6d055a7fbcf0ed467addb1c4d497d871fc649 (diff) | |
download | libpopt-196149b57a9edebb3aeaf31f0ea8bfcbb9dd764b.tar.gz |
add tdict to the unit test: augment make check with some tdict tests
Diffstat (limited to 'tdict.c')
-rw-r--r-- | tdict.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -44,7 +44,7 @@ exit: static struct poptOption options[] = { { "debug", 'd', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE, &_debug, 1, "Set debugging.", NULL }, - { "verbose", 'v', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE, &_verbose, 1, + { "verbose", 'v', POPT_BIT_SET|POPT_ARGFLAG_TOGGLE, &_verbose, 0, "Set verbosity.", NULL }, POPT_AUTOALIAS @@ -121,8 +121,14 @@ int main(int argc, const char ** argv) ec = 0; exit: - fprintf(stdout, "===== poptBits N:%u M:%u K:%u (%uKb) total(%u) = hits(%u) + misses(%u)\n", - _poptBitsN, _poptBitsM, _poptBitsK, (((_poptBitsM/8)+1)+1023)/1024, e.total, e.hits, e.misses); + /* XXX : depends on the /usr/share/dict/words contents so no default*/ + if (rc >= 0) { + if (_debug) { + fprintf(stdout, "===== poptBits N:%u M:%u K:%u (%uKb) ", + _poptBitsN, _poptBitsM, _poptBitsK, (((_poptBitsM/8)+1)+1023)/1024); + } + fprintf(stdout, "total(%u) = hits(%u) + misses(%u)\n", e.total, e.hits, e.misses); + } if (avbits) free(avbits); optCon = poptFreeContext(optCon); #if defined(HAVE_MCHECK_H) && defined(HAVE_MTRACE) |