runner.h File Reference
#include <iostream>
#include <tqobject.h>
#include <tqasciidict.h>
#include <tqstring.h>
#include <tdelibs_export.h>
#include "tester.h"
Go to the source code of this file.
Classes | |
class | KUnitTest::Runner |
class | KUnitTest::TesterAutoregister |
Namespaces | |
KUnitTest | |
Macros | |
#define | TDEUNITTEST_SUITE(suite) static const TQString s_tdeunittest_suite = suite; |
#define | TDEUNITTEST_REGISTER_TESTER(tester) static TesterAutoregister tester##Autoregister( TQString(s_tdeunittest_suite + TQString("::") + TQString::fromLocal8Bit(#tester)).local8Bit() , new tester ()) |
#define | TDEUNITTEST_REGISTER_NAMEDTESTER(name, tester) static TesterAutoregister tester##Autoregister( TQString(s_tdeunittest_suite + TQString("::") + TQString::fromLocal8Bit(name)).local8Bit() , new tester ()) |
Typedefs | |
typedef TQAsciiDict< Tester > | KUnitTest::RegistryType |
typedef TQAsciiDictIterator< Tester > | KUnitTest::RegistryIteratorType |
Detailed Description
Defines a set of macros and classes for running unit tests
Definition in file runner.h.
Macro Definition Documentation
◆ TDEUNITTEST_REGISTER_TESTER
#define TDEUNITTEST_REGISTER_TESTER | ( | tester | ) | static TesterAutoregister tester##Autoregister( TQString(s_tdeunittest_suite + TQString("::") + TQString::fromLocal8Bit(#tester)).local8Bit() , new tester ()) |
Automatic registration of Tester classes.
This macro can be used to register the Tester into the global registry. Use this macro in the implementation file of your Tester class. If you keep the Tester classes in a shared or convenience library then you should not use this macro as this macro relies on the static initialization of a TesterAutoregister class. You can always use the static Runner::registerTester(const char *name, Tester *test) method.