~lifeeth/siam32/devel-beta

« back to all changes in this revision

Viewing changes to include/test.h

  • Committer: Christopher D. Leary
  • Date: 2008-03-29 20:34:22 UTC
  • Revision ID: cdleary@gamma-20080329203422-fz0rlj1vf914g3a1
Added some dedicated testing functionality in an effort to start standardizing
tests for expect-like regression testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef TEST_H
 
2
#define TEST_H
 
3
 
 
4
extern char failed[];
 
5
extern char passed[];
 
6
 
 
7
#define TEST(func) \
 
8
    warn(#func "\n"); \
 
9
    if (func()) warn(passed); \
 
10
    else warn(failed);
 
11
 
 
12
#endif