• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeunittest
 

tdeunittest

  • tdeunittest
Namespaces | Macros
module.h File Reference
#include <tqstring.h>
#include <klibloader.h>
#include <tdeunittest/runner.h>

Go to the source code of this file.

Namespaces

namespace  KUnitTest
 

Macros

#define TDEUNITTEST_MODULE(library, suite)
 
#define TDEUNITTEST_MODULE_REGISTER_TESTER(tester)
 
#define TDEUNITTEST_MODULE_REGISTER_NAMEDTESTER(name, tester)
 

Detailed Description

Provides macros to ease building unit tests as shared libraries

Definition in file module.h.

Macro Definition Documentation

◆ TDEUNITTEST_MODULE

#define TDEUNITTEST_MODULE (   library,
  suite 
)

Use this macro if you are creating a KUnitTest module named library. This macro creates a module-class named a factory class. The module will appear under the name suite in the test runner. There is no need in calling the K_EXPORT_COMPONENT_FACTORY macro, this is taken care of automatically.

TDEUNITTEST_MODULE(tdeunittest_samplemodule,"TestSuite")
TDEUNITTEST_MODULE
#define TDEUNITTEST_MODULE(library, suite)
Definition: module.h:50

Definition at line 50 of file module.h.

◆ TDEUNITTEST_MODULE_REGISTER_NAMEDTESTER

#define TDEUNITTEST_MODULE_REGISTER_NAMEDTESTER (   name,
  tester 
)
Value:
static class tester##ModuleAutoregister \
{ \
public: \
tester##ModuleAutoregister() \
{ \
TQString fullName = s_tdeunittest_suite + TQString("::") + TQString::fromLocal8Bit(name); \
KUnitTest::Tester *test = new tester(fullName.local8Bit()); \
tdeunittest_registerModuleTester(fullName.local8Bit(), test); \
} \
} tester##ModuleAutoregisterInstance;

Use this macro to add a tester class, with specified name, to your module..

TDEUNITTEST_MODULE_REGISTER_TESTER("SubSuite::PrettyName",SimpleSampleTester)
TDEUNITTEST_MODULE_REGISTER_TESTER
#define TDEUNITTEST_MODULE_REGISTER_TESTER(tester)
Definition: module.h:89

Definition at line 107 of file module.h.

◆ TDEUNITTEST_MODULE_REGISTER_TESTER

#define TDEUNITTEST_MODULE_REGISTER_TESTER (   tester)
Value:
static class tester##ModuleAutoregister \
{ \
public: \
tester##ModuleAutoregister() \
{ \
KUnitTest::Tester *test = new tester(); \
TQString name = s_tdeunittest_suite + TQString::fromLatin1("::") + TQString::fromLocal8Bit(#tester); \
test->setName(name.local8Bit()); \
tdeunittest_registerModuleTester(name.local8Bit(), test ); \
} \
} tester##ModuleAutoregisterInstance;

Use this macro to add a tester class to your module. The name of the tester will be identical to the class name.

TDEUNITTEST_MODULE_REGISTER_TESTER(SimpleSampleTester)

Definition at line 89 of file module.h.

tdeunittest

Skip menu "tdeunittest"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

tdeunittest

Skip menu "tdeunittest"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeunittest by doxygen 1.9.4
This website is maintained by Timothy Pearson.