summaryrefslogtreecommitdiff
path: root/include/cppunit/plugin/TestPlugInSuite.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cppunit/plugin/TestPlugInSuite.h')
-rw-r--r--include/cppunit/plugin/TestPlugInSuite.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/cppunit/plugin/TestPlugInSuite.h b/include/cppunit/plugin/TestPlugInSuite.h
new file mode 100644
index 0000000..19dc65d
--- /dev/null
+++ b/include/cppunit/plugin/TestPlugInSuite.h
@@ -0,0 +1,54 @@
+#ifndef CPPUNIT_EXTENSIONS_TESTPLUGINSUITE_H
+#define CPPUNIT_EXTENSIONS_TESTPLUGINSUITE_H
+
+#include <cppunit/TestComposite.h>
+#if !defined(CPPUNIT_NO_TESTPLUGIN)
+
+#include <cppunit/plugin/TestPlugIn.h>
+
+namespace CppUnit
+{
+
+class DynamicLibraryManager;
+
+
+/*! \brief A suite that wrap a test plug-in.
+ * \ingroup WritingTestPlugIn
+ */
+class TestPlugInSuite : public TestComposite
+{
+public:
+ /*! Constructs a TestPlugInSuite object.
+ */
+ TestPlugInSuite( const std::string &libraryFileName );
+
+ /// Destructor.
+ virtual ~TestPlugInSuite();
+
+ int getChildTestCount() const;
+
+protected:
+ Test *doGetChildTestAt( int index ) const;
+
+ /// Prevents the use of the copy constructor.
+ TestPlugInSuite( const TestPlugInSuite &copy );
+
+ /// Prevents the use of the copy operator.
+ void operator =( const TestPlugInSuite &copy );
+
+private:
+ /// Manager for the dynamic library.
+ DynamicLibraryManager *m_library;
+ /// Interface returned by the plug-in.
+ CppUnitTestPlugIn *m_interface;
+ /// Suite returned by the plug-in.
+ Test *m_librarySuite;
+};
+
+
+} // namespace CppUnit
+
+
+#endif // !defined(CPPUNIT_NO_TESTPLUGIN)
+
+#endif // CPPUNIT_EXTENSIONS_TESTPLUGINSUITE_H