- Timestamp:
- May 16, 2010, 1:15:25 AM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- c314f39
- Parents:
- f034ac0
- git-author:
- David Benjamin <davidben@mit.edu> (05/15/10 17:38:31)
- git-committer:
- David Benjamin <davidben@mit.edu> (05/16/10 01:15:25)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tester.c
rf034ac0 r3f6555d 33 33 numfailures += owl_variable_regtest(); 34 34 numfailures += owl_filter_regtest(); 35 numfailures += owl_obarray_regtest();36 35 numfailures += owl_editwin_regtest(); 37 36 if (numfailures) { … … 301 300 } 302 301 303 304 int owl_obarray_regtest(void) {305 int numfailed = 0;306 const char *p,*p2;307 308 owl_obarray oa;309 owl_obarray_init(&oa);310 311 printf("# BEGIN testing owl_obarray\n");312 313 p = owl_obarray_insert(&oa, "test");314 FAIL_UNLESS("returned string is equal", p && !strcmp(p, "test"));315 p2 = owl_obarray_insert(&oa, "test");316 FAIL_UNLESS("returned string is equal", p2 && !strcmp(p2, "test"));317 FAIL_UNLESS("returned the same string", p2 && p == p2);318 319 p = owl_obarray_insert(&oa, "test2");320 FAIL_UNLESS("returned string is equal", p && !strcmp(p, "test2"));321 p2 = owl_obarray_find(&oa, "test2");322 FAIL_UNLESS("returned the same string", p2 && !strcmp(p2, "test2"));323 324 p = owl_obarray_find(&oa, "nothere");325 FAIL_UNLESS("Didn't find a string that isn't there", p == NULL);326 327 printf("# END testing owl_obarray (%d failures)\n", numfailed);328 329 return numfailed;330 }331 332 302 int owl_editwin_regtest(void) { 333 303 int numfailed = 0;
Note: See TracChangeset
for help on using the changeset viewer.