• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KUnitTest

  • sources
  • kde-4.12
  • kdelibs
  • kde3support
  • kunittest
Namespaces | Macros
module.h File Reference
#include <QtCore/QString>
#include <klibloader.h>
#include <kunittest/runner.h>
Include dependency graph for module.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 KUnitTest
 

Macros

#define KUNITTEST_MODULE(library, suite)
 
#define KUNITTEST_MODULE_REGISTER_NAMEDTESTER(name, tester)
 
#define KUNITTEST_MODULE_REGISTER_TESTER(tester)
 

Macro Definition Documentation

#define KUNITTEST_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.

KUNITTEST_MODULE(kunittest_samplemodule,"TestSuite")

Definition at line 45 of file module.h.

#define KUNITTEST_MODULE_REGISTER_NAMEDTESTER (   name,
  tester 
)
Value:
static class tester##ModuleAutoregister \
{ \
public: \
tester##ModuleAutoregister() \
{ \
QString fullName = s_kunittest_suite + QString("::") + QString::fromLocal8Bit(name); \
KUnitTest::Tester *test = new tester(fullName.local8Bit()); \
kunittest_registerModuleTester(fullName.local8Bit(), test); \
} \
} tester##ModuleAutoregisterInstance;
QString

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

KUNITTEST_MODULE_REGISTER_TESTER("SubSuite::PrettyName",SimpleSampleTester)

Definition at line 102 of file module.h.

#define KUNITTEST_MODULE_REGISTER_TESTER (   tester)
Value:
static class tester##ModuleAutoregister \
{ \
public: \
tester##ModuleAutoregister() \
{ \
KUnitTest::Tester *test = new tester(); \
QString name = s_kunittest_suite + QLatin1String("::") + QString::fromLocal8Bit(#tester); \
test->setName(name.local8Bit()); \
kunittest_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.

KUNITTEST_MODULE_REGISTER_TESTER(SimpleSampleTester)

Definition at line 84 of file module.h.

This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:52:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KUnitTest

Skip menu "KUnitTest"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal