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

KUnitTest

  • kde3support
  • kunittest
modrunner.cpp
Go to the documentation of this file.
1 
26 #include <kdebug.h>
27 #include <kglobal.h>
28 #include <kcomponentdata.h>
29 #include <kaboutdata.h>
30 #include <kcmdlineargs.h>
31 #include <klocale.h>
32 
33 #include "runner.h"
34 
35 
36 int main( int argc, char **argv )
37 {
38  KComponentData componentData("modrunner");
39 
40  KLocalizedString description =
41  ki18n("A command-line application that can be used to run KUnitTest modules.");
42 
43  const char version[] = "0.1";
44 
45  KCmdLineOptions options;
46  options.add("query [regexp]", ki18n("Only run modules whose filenames match the regexp."), "^kunittest_.*\\.la$");
47  options.add("folder [folder]", ki18n("Only run tests modules which are found in the folder. Use the query option to select modules."), ".");
48  options.add("enable-dbgcap", ki18n("Disables debug capturing. You typically use this option when you use the GUI."));
49 
50  KAboutData about("KUnitTest Module Runner", 0, ki18n("KUnitTest ModRunner"), version, description,
51  KAboutData::License_BSD, ki18n("(C) 2005 Jeroen Wijnhout"), KLocalizedString(), 0,
52  "Jeroen.Wijnhout@kdemail.net");
53 
54  KCmdLineArgs::init(argc, argv, &about);
55  KCmdLineArgs::addCmdLineOptions( options );
56  KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
57 
58  KUnitTest::Runner::loadModules(args->getOption("folder"), args->getOption("query"));
59  KUnitTest::Runner::setDebugCapturingEnabled(args->isSet("enable-dbgcap"));
60 
61  KUnitTest::Runner::self()->runTests();
62 
63  return KUnitTest::Runner::self()->numberOfFailedTests() - KUnitTest::Runner::self()->numberOfExpectedFailures();
64 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Mon Jul 15 2013 05:15:04 by doxygen 1.8.3.1 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-4.10.4 API Reference

Skip menu "kdelibs-4.10.4 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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