source: tester.c @ a2b3289

release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since a2b3289 was a2b3289, checked in by Nelson Elhage <nelhage@mit.edu>, 15 years ago
tester: Report the test count at the end, not the beginning. A static test count is just too much effort to maintain correct.
  • Property mode set to 100644
File size: 733 bytes
RevLine 
[7d4fbcd]1#include "owl.h"
2#include <unistd.h>
3#include <stdlib.h>
4
[b2b0773]5owl_global g;
6
[a2b3289]7int numtests;
[1cf3f8d3]8
[094009a]9int main(int argc, char **argv, char **env)
10{
[124aebc]11  owl_errqueue_init(owl_global_get_errqueue(&g));
[e7dc035]12  owl_obarray_init(&(g.obarray));
[124aebc]13
[a2b3289]14  numtests = 0;
[7d4fbcd]15  int numfailures=0;
[a2b3289]16  /*
17    printf("1..%d\n", OWL_UTIL_NTESTS+OWL_DICT_NTESTS+OWL_VARIABLE_NTESTS
18    +OWL_FILTER_NTESTS+OWL_OBARRAY_NTESTS);
19  */
[3381399]20  numfailures += owl_util_regtest();
21  numfailures += owl_dict_regtest();
22  numfailures += owl_variable_regtest();
23  numfailures += owl_filter_regtest();
24  numfailures += owl_obarray_regtest();
25  if (numfailures) {
[1cf3f8d3]26      fprintf(stderr, "# *** WARNING: %d failures total\n", numfailures);
[7d4fbcd]27  }
[a2b3289]28  printf("1..%d\n", numtests);
[3381399]29  return(numfailures);
[7d4fbcd]30}
Note: See TracBrowser for help on using the repository browser.