diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2007-06-27 15:42:50 +0000 | 
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2007-06-27 15:42:50 +0000 | 
| commit | 5ec9a131e12d021c42b46b601f5e79502485bebb (patch) | |
| tree | 31d63d293a6c5bc6ea1d677474380ea48976add4 /src/unit/entities | |
| parent | 01ecf54b07e75c17ca5f7039084daeefaea9a1c7 (diff) | |
| download | libbu++-5ec9a131e12d021c42b46b601f5e79502485bebb.tar.gz libbu++-5ec9a131e12d021c42b46b601f5e79502485bebb.tar.bz2 libbu++-5ec9a131e12d021c42b46b601f5e79502485bebb.tar.xz libbu++-5ec9a131e12d021c42b46b601f5e79502485bebb.zip | |
The MemBuf works just fine, although it still can't over-write data in the
buffer.
Diffstat (limited to '')
| -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> | ||
