diff options
Diffstat (limited to 'src/unit/entities')
| -rw-r--r-- | src/unit/entities/unit | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/unit/entities/unit b/src/unit/entities/unit new file mode 100644 index 0000000..28db45f --- /dev/null +++ b/src/unit/entities/unit | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | <?xml version="1.1" ?> | ||
| 2 | <entity desc="Unit test framework"> | ||
| 3 | <param name="name" required="yes" desc="Name of the class"/> | ||
| 4 | <file | ||
| 5 | name="source" | ||
| 6 | filename="{=name:%tolower}.cpp" | ||
| 7 | >#include "bu/unitsuite.h" | ||
| 8 | |||
| 9 | class Unit : public Bu::UnitSuite | ||
| 10 | { | ||
| 11 | public: | ||
| 12 | Unit() | ||
| 13 | { | ||
| 14 | setName("{=name}"); | ||
| 15 | addTest( Unit::test01 ); | ||
| 16 | } | ||
| 17 | |||
| 18 | virtual ~Unit() | ||
| 19 | { | ||
| 20 | } | ||
| 21 | |||
| 22 | void test01() | ||
| 23 | { | ||
| 24 | unitTest( 0 == 5 ); | ||
| 25 | } | ||
| 26 | }; | ||
| 27 | |||
| 28 | int main( int argc, char *argv[] ){ return Unit().run( argc, argv ); } | ||
| 29 | </file> | ||
| 30 | </entity> | ||
