source: tester.c @ a2b3289

release-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>, 12 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
Line 
1#include "owl.h"
2#include <unistd.h>
3#include <stdlib.h>
4
5owl_global g;
6
7int numtests;
8
9int main(int argc, char **argv, char **env)
10{
11  owl_errqueue_init(owl_global_get_errqueue(&g));
12  owl_obarray_init(&(g.obarray));
13
14  numtests = 0;
15  int numfailures=0;
16  /*
17    printf("1..%d\n", OWL_UTIL_NTESTS+OWL_DICT_NTESTS+OWL_VARIABLE_NTESTS
18    +OWL_FILTER_NTESTS+OWL_OBARRAY_NTESTS);
19  */
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) {
26      fprintf(stderr, "# *** WARNING: %d failures total\n", numfailures);
27  }
28  printf("1..%d\n", numtests);
29  return(numfailures);
30}
Note: See TracBrowser for help on using the repository browser.