EmbeddedUnit
TestFixture.h
Go to the documentation of this file.
1 
34 #ifndef __TESTCALLER_H__
35 #define __TESTCALLER_H__
36 
37 typedef struct __TestFunction TestFunction;
38 typedef struct __TestFunction* TestFunctionRef;/*downward compatible*/
39 
41  char *name;
42  void(*test)(void);
43 };
44 
45 #define new_TestFunction(name,test)\
46  {\
47  name,\
48  test,\
49  }
50 
51 typedef struct __TestFixture TestFixture;
52 typedef struct __TestFixture* TestFixtureRef;/*downward compatible*/
53 
54 struct __TestFixture {
55  TestImplement* isa;
56  char *name;
57  void(*setUp)(void);
58  void(*tearDown)(void);
59  int numberOfFixtuers;
60  TestFunction* functions;
61 };
62 
63 extern const TestImplement TestFixtureImplement;
64 
65 #define new_TestFixture(nm,sup,tdw,NoFixtures,fixtures) \
66  {\
67  (TestImplement*)&TestFixtureImplement,\
68  nm,\
69  sup,\
70  tdw,\
71  NoFixtures,\
72  fixtures,\
73  }
74 
75 #endif/*__TESTCALLER_H__*/