Changeset a2b3289
- Timestamp:
- Aug 17, 2009, 9:22:15 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 8bce750
- Parents:
- ecc958e
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
filter.c
r4542047 ra2b3289 311 311 owl_message_set_attribute(&m, "foo", "bar"); 312 312 313 #define TEST_FILTER(f, e) numfailed += owl_filter_test_string(f, &m, e) 314 313 #define TEST_FILTER(f, e) do { \ 314 numtests++; \ 315 numfailed += owl_filter_test_string(f, &m, e); \ 316 } while(0) 315 317 316 318 TEST_FILTER("true", 1); -
test.h
r1cf3f8d3 ra2b3289 2 2 #define __OWL_TEST_H__ 3 3 4 extern int numtests; 5 4 6 #define FAIL_UNLESS(desc,pred) do { int __pred = (pred); \ 5 printf("%s %s", (__pred)?"ok":(numfailed++,"not ok"), desc); \ 7 numtests++; \ 8 printf("%s %s", (__pred)?"ok":(numfailed++,"not ok"), desc); \ 6 9 if(!(__pred)) printf("\t(%s:%d)", __FILE__, __LINE__); printf("%c", '\n'); } while(0) 7 10 -
tester.c
rd43edd2 ra2b3289 5 5 owl_global g; 6 6 7 #define OWL_UTIL_NTESTS 9 8 #define OWL_DICT_NTESTS 19 9 #define OWL_OBARRAY_NTESTS 6 10 #define OWL_VARIABLE_NTESTS 36 11 #define OWL_FILTER_NTESTS 24 7 int numtests; 12 8 13 9 int main(int argc, char **argv, char **env) … … 16 12 owl_obarray_init(&(g.obarray)); 17 13 14 numtests = 0; 18 15 int numfailures=0; 19 printf("1..%d\n", OWL_UTIL_NTESTS+OWL_DICT_NTESTS+OWL_VARIABLE_NTESTS 20 +OWL_FILTER_NTESTS+OWL_OBARRAY_NTESTS); 16 /* 17 printf("1..%d\n", OWL_UTIL_NTESTS+OWL_DICT_NTESTS+OWL_VARIABLE_NTESTS 18 +OWL_FILTER_NTESTS+OWL_OBARRAY_NTESTS); 19 */ 21 20 numfailures += owl_util_regtest(); 22 21 numfailures += owl_dict_regtest(); … … 27 26 fprintf(stderr, "# *** WARNING: %d failures total\n", numfailures); 28 27 } 28 printf("1..%d\n", numtests); 29 29 return(numfailures); 30 30 }
Note: See TracChangeset
for help on using the changeset viewer.