diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-07-13 09:33:50 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-07-13 09:33:50 +0000 |
| commit | f1bf3276752a10a2cdf4e3cf3087399d199c4566 (patch) | |
| tree | 13dc67edcf465f44b9fe835f5e0b201511774d07 /include/cppunit/ui/mfc | |
| parent | 570132ec2707c8bac6c27c758254f05e293fe613 (diff) | |
| download | cppunit-f1bf3276752a10a2cdf4e3cf3087399d199c4566.tar.gz | |
Include/cppunit/ui/text/TestRunner.
include/cppunit/ui/text/TestRunner.h:
* src/cppunit/TextTestRunner.cpp: Renamed TextUi::TestRunner
TextTestRunner and moved it to the CppUnit namespace. Added
a deprecated typedef for compatibility with previous version.
* include/cppunit/ui/text/TextTestRunner.h: added.
* include/cppunit/ui/mfc/TestRunner.h:
* src/cppunit/msvc6/testrunner/TestRunner.cpp: Renamed MfcUi::TestRunner
MfcTestRunner. Added deprecated typedef for compatibility. Renamed
TestRunner.cpp to MfcTestRunner.cpp.
* include/cppunit/ui/mfc/MfcTestRunner.h: added.
* include/cppunit/ui/qt/TestRunner.h:
* src/qttestrunner/TestRunner.cpp: renamed QtUi::TestRunner QtTestRunner
and moved it to CppUnit namespace. Added a deprecated typedef for
compatibility. Renamed TestRunner.cpp to QtTestRunner.cpp.
* include/cppunit/ui/qt/TestRunner.h:
* src/qttestrunner/TestRunner.h: Moved TestRunner to CppUnit namespace
and renamed it QtTestRunner. Added deprecated typedef for compatibility.
* include/cppunit/Asserter.h:
* src/cppunit/Asserter.cpp: changed namespace Asserter to a struct and
made all methods static.
* include/cppunit/extensions/HelperMacros.h:
* include/cppunit/extensions/SourceLine.h:
* include/cppunit/extensions/TestAssert.h:
* include/cppunit/extensions/TestPlugIn.h:
* include/cppunit/Portability.h: changed CPPUNIT_NS(symbol) to a
symbol macro that expand either to CppUnit or nothing. The symbol is
no longer a parameter.
* include/cppunit/portability/CppUnitVector.h:
* include/cppunit/portability/CppUnitDeque.h:
* include/cppunit/portability/CppUnitMap.h: added. STL Wrapper for
compilers that do not support template default argumenent and need
the allocator to be passed when instantiating STL container.
* examples/cppunittest/*.h:
* examples/cppunittest/*.cpp:
* src/msvc6/testrunner/*.h:
* src/msvc6/testrunner/*.cpp:
* src/msvc6/testpluginrunner/*.h:
* src/msvc6/testpluginrunner/*.cpp:
* src/qttestrunner/*.h:
* src/qttestrunner/*.cpp: replaced occurence of CppUnit:: by CPPUNIT_NS.
* src/cppunit/TestSuite.h:
replaced occurence of std::vector by CppUnitVector.
Diffstat (limited to 'include/cppunit/ui/mfc')
| -rw-r--r-- | include/cppunit/ui/mfc/Makefile.am | 3 | ||||
| -rw-r--r-- | include/cppunit/ui/mfc/MfcTestRunner.h | 76 | ||||
| -rw-r--r-- | include/cppunit/ui/mfc/TestRunner.h | 79 |
3 files changed, 86 insertions, 72 deletions
diff --git a/include/cppunit/ui/mfc/Makefile.am b/include/cppunit/ui/mfc/Makefile.am index 5d84e7b..1ea8b5e 100644 --- a/include/cppunit/ui/mfc/Makefile.am +++ b/include/cppunit/ui/mfc/Makefile.am @@ -1,4 +1,5 @@ libcppunitincludedir = $(includedir)/cppunit/ui/mfc libcppunitinclude_HEADERS = \ - TestRunner.h + TestRunner.h \ + MfcTestRunner.h diff --git a/include/cppunit/ui/mfc/MfcTestRunner.h b/include/cppunit/ui/mfc/MfcTestRunner.h new file mode 100644 index 0000000..6a5f7b7 --- /dev/null +++ b/include/cppunit/ui/mfc/MfcTestRunner.h @@ -0,0 +1,76 @@ +#ifndef CPPUNITUI_MFC_MFCTESTRUNNER_H +#define CPPUNITUI_MFC_MFCTESTRUNNER_H + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 + +#include <cppunit/Portability.h> +#include <cppunit/portability/CppUnitVector.h> + +/* Refer to MSDN documentation to know how to write and use MFC extension DLL: + mk:@MSITStore:h:\DevStudio\MSDN\98VSa\1036\vcmfc.chm::/html/_mfcnotes_tn033.htm#_mfcnotes_how_to_write_an_mfc_extension_dll + + This can be found in the index with "mfc extension" + The basic: + Using: + - your application must use MFC DLL + - memory allocation is done using the same heap + - you must define the symbol _AFX_DLL + + Building: + - you must define the symbol _AFX_DLL and _AFX_EXT + - export class using AFX_EXT_CLASS + */ + +CPPUNIT_NS_BEGIN + + class Test; + class TestSuite; + + +/*! \brief MFC test runner. + * \ingroup ExecutingTest + * + * Use this to launch the MFC TestRunner. Usually called from you CWinApp subclass: + * + * \code + * #include <cppunit/ui/mfc/MfcTestRunner.h> + * #include <cppunit/extensions/TestFactoryRegistry.h> + * + * void + * CHostAppApp::RunUnitTests() + * { + * CppUnit::MfcTestRunner runner; + * runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() ); + * + * runner.run(); + * } + * \endcode + * \see CppUnit::TextTestRunner, CppUnit::TestFactoryRegistry. + */ +class AFX_EXT_CLASS MfcTestRunner +{ +public: + MfcTestRunner(); + virtual ~MfcTestRunner(); + + void run(); + + void addTest( Test *test ); + + void addTests( const CppUnitVector<Test *> &tests ); + +protected: + Test *getRootTest(); + + TestSuite *m_suite; + + typedef CppUnitVector<Test *> Tests; + Tests m_tests; +}; + + +CPPUNIT_NS_END + +#endif // CPPUNITUI_MFC_MFCTESTRUNNER_H
\ No newline at end of file diff --git a/include/cppunit/ui/mfc/TestRunner.h b/include/cppunit/ui/mfc/TestRunner.h index 7186bf6..c4d6aff 100644 --- a/include/cppunit/ui/mfc/TestRunner.h +++ b/include/cppunit/ui/mfc/TestRunner.h @@ -1,82 +1,19 @@ #ifndef CPPUNITUI_MFC_TESTRUNNER_H #define CPPUNITUI_MFC_TESTRUNNER_H - -#if _MSC_VER >= 1000 -#pragma once -#endif // _MSC_VER >= 1000 - -#include <cppunit/Portability.h> -#include <vector> - -/* Refer to MSDN documentation to know how to write and use MFC extension DLL: - mk:@MSITStore:h:\DevStudio\MSDN\98VSa\1036\vcmfc.chm::/html/_mfcnotes_tn033.htm#_mfcnotes_how_to_write_an_mfc_extension_dll - - This can be found in the index with "mfc extension" - The basic: - Using: - - your application must use MFC DLL - - memory allocation is done using the same heap - - you must define the symbol _AFX_DLL - - Building: - - you must define the symbol _AFX_DLL and _AFX_EXT - - export class using AFX_EXT_CLASS - */ +#include <cppunit/ui/mfc/MfcTestRunner.h> CPPUNIT_NS_BEGIN - class Test; - class TestSuite; - +#if defined(CPPUNIT_HAVE_NAMESPACES) namespace MfcUi { - - -/*! \brief MFC test runner. - * \ingroup ExecutingTest - * - * Use this to launch the MFC TestRunner. Usually called from you CWinApp subclass: - * - * \code - * #include <cppunit/ui/mfc/TestRunner.h> - * #include <cppunit/extensions/TestFactoryRegistry.h> - * - * void - * CHostAppApp::RunUnitTests() - * { - * CppUnit::MfcUi::TestRunner runner; - * runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() ); - * - * runner.run(); - * } - * \endcode - * \see CppUnit::TextUi::TestRunner, CppUnit::TestFactoryRegistry. - */ -class AFX_EXT_CLASS TestRunner -{ -public: - TestRunner(); - virtual ~TestRunner(); - - void run(); - - void addTest( Test *test ); - - void addTests( const std::vector<Test *> &tests ); - -protected: - Test *getRootTest(); - - TestSuite *m_suite; - - typedef std::vector<Test *> Tests; - Tests m_tests; -}; - - -} // namespace MfcUi - + /*! Mfc TestRunner (DEPRECATED). + * \deprecated Use CppUnit::MfcTestRunner instead. + */ + typedef CPPUNIT_NS::MfcTestRunner TestRunner; +} +#endif // defined(CPPUNIT_HAVE_NAMESPACES) CPPUNIT_NS_END |
