1 #ifndef __CREATEDTEST_H
2 #define __CREATEDTEST_H
4 #include <cxxtest/TestSuite.h>
5 #include <string.h>
6 #include <memory.h>
8 //
9 // This test suite shows what to do when your test case
10 // class cannot be instantiated statically.
11 // As an example, this test suite requires a non-default constructor.
12 //
14 class CreatedTest : public CxxTest::TestSuite
15 {
16 char *_buffer;
17 public:
18 CreatedTest( unsigned size ) : _buffer( new char[size] ) {}
19 virtual ~CreatedTest() { delete [] _buffer; }
21 static CreatedTest *createSuite() { return new CreatedTest( 16 ); }
22 static void destroySuite( CreatedTest *suite ) { delete suite; }
24 void test_nothing()
25 {
26 TS_FAIL( "Nothing to test" );
27 }
28 };
31 #endif // __CREATEDTEST_H