Changeset a2b3289 for test.h


Ignore:
Timestamp:
Aug 17, 2009, 9:22:15 PM (13 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
8bce750
Parents:
ecc958e
Message:
tester: Report the test count at the end, not the beginning.

A static test count is just too much effort to maintain correct.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test.h

    r1cf3f8d3 ra2b3289  
    22#define __OWL_TEST_H__
    33
     4extern int numtests;
     5
    46#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);        \
    69    if(!(__pred)) printf("\t(%s:%d)", __FILE__, __LINE__); printf("%c", '\n'); } while(0)
    710
Note: See TracChangeset for help on using the changeset viewer.