diff options
author | Max Horn | 2006-03-29 10:25:48 +0000 |
---|---|---|
committer | Max Horn | 2006-03-29 10:25:48 +0000 |
commit | 3820593bb8dfdca4e2e17c70b278065b7f7894d9 (patch) | |
tree | df3e8bebda3abcd99d0882dc9e8c6410f86850fb /test/cxxtest/sample/CreatedTest.h | |
parent | 9c94670e22cb68e32fd38c0d2b009539e35d4a71 (diff) | |
download | scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.tar.gz scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.tar.bz2 scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.zip |
bringing cxxtest-3.10.1 to ScummVM's main branch
svn-id: r21488
Diffstat (limited to 'test/cxxtest/sample/CreatedTest.h')
-rw-r--r-- | test/cxxtest/sample/CreatedTest.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/cxxtest/sample/CreatedTest.h b/test/cxxtest/sample/CreatedTest.h new file mode 100644 index 0000000000..84e8ae8a4b --- /dev/null +++ b/test/cxxtest/sample/CreatedTest.h @@ -0,0 +1,31 @@ +#ifndef __CREATEDTEST_H +#define __CREATEDTEST_H + +#include <cxxtest/TestSuite.h> +#include <string.h> +#include <memory.h> + +// +// This test suite shows what to do when your test case +// class cannot be instantiated statically. +// As an example, this test suite requires a non-default constructor. +// + +class CreatedTest : public CxxTest::TestSuite +{ + char *_buffer; +public: + CreatedTest( unsigned size ) : _buffer( new char[size] ) {} + virtual ~CreatedTest() { delete [] _buffer; } + + static CreatedTest *createSuite() { return new CreatedTest( 16 ); } + static void destroySuite( CreatedTest *suite ) { delete suite; } + + void test_nothing() + { + TS_FAIL( "Nothing to test" ); + } +}; + + +#endif // __CREATEDTEST_H |