summaryrefslogtreecommitdiff
path: root/examples/cppunittest/TestTest.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cppunittest/TestTest.h')
-rw-r--r--examples/cppunittest/TestTest.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/examples/cppunittest/TestTest.h b/examples/cppunittest/TestTest.h
new file mode 100644
index 0000000..fa0cef2
--- /dev/null
+++ b/examples/cppunittest/TestTest.h
@@ -0,0 +1,67 @@
+#ifndef TESTTEST_H
+#define TESTTEST_H
+
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestSuite.h>
+#include <cppunit/TestPath.h>
+#include "MockTestCase.h"
+#include <stdexcept>
+
+
+/*! \class TestTest
+ * \brief Unit test for class Test.
+ */
+class TestTest : public CppUnit::TestFixture
+{
+ CPPUNIT_TEST_SUITE( TestTest );
+ CPPUNIT_TEST( testFindTestPathPointerThis );
+ CPPUNIT_TEST( testFindTestPathPointer );
+ CPPUNIT_TEST( testFindTestPathPointerFail );
+ CPPUNIT_TEST( testFindTestPathNameThis );
+ CPPUNIT_TEST( testFindTestPathName );
+ CPPUNIT_TEST( testFindTestPathNameFail );
+ CPPUNIT_TEST( testFindTest );
+ CPPUNIT_TEST_EXCEPTION( testFindTestThrow, std::invalid_argument );
+ CPPUNIT_TEST( testResolveTestPath );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+ /*! Constructs a TestTest object.
+ */
+ TestTest();
+
+ /// Destructor.
+ virtual ~TestTest();
+
+ void setUp();
+ void tearDown();
+
+ void testFindTestPathPointerThis();
+ void testFindTestPathPointer();
+ void testFindTestPathPointerFail();
+
+ void testFindTestPathNameThis();
+ void testFindTestPathName();
+ void testFindTestPathNameFail();
+
+ void testFindTest();
+ void testFindTestThrow();
+
+ void testResolveTestPath();
+
+private:
+ /// Prevents the use of the copy constructor.
+ TestTest( const TestTest &copy );
+
+ /// Prevents the use of the copy operator.
+ void operator =( const TestTest &copy );
+
+private:
+ CppUnit::TestSuite *m_suite;
+ MockTestCase *m_test1;
+ MockTestCase *m_test2;
+ CppUnit::TestPath *m_path;
+};
+
+
+#endif // TESTTEST_H