diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-09-03 20:02:30 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-09-03 21:00:39 +0200 |
commit | c6cb3f27942501d24b0ded69c90ebbf7c43c755e (patch) | |
tree | 08aa592dea84d77931478751d69b47cb4d6b50ee /tdeunittest | |
parent | f41d2ce0f1929574f3b65eef2675ac65177608f1 (diff) | |
download | tdelibs-c6cb3f27942501d24b0ded69c90ebbf7c43c755e.tar.gz tdelibs-c6cb3f27942501d24b0ded69c90ebbf7c43c755e.zip |
Additional k => tde renaming and fixes
Diffstat (limited to 'tdeunittest')
-rw-r--r-- | tdeunittest/Makefile.am | 2 | ||||
-rw-r--r-- | tdeunittest/module.h | 22 | ||||
-rw-r--r-- | tdeunittest/runner.h | 22 | ||||
-rw-r--r-- | tdeunittest/samplemodule.cpp | 4 | ||||
-rw-r--r-- | tdeunittest/tester.h | 30 |
5 files changed, 40 insertions, 40 deletions
diff --git a/tdeunittest/Makefile.am b/tdeunittest/Makefile.am index 5eb6852ab..66ce0dffc 100644 --- a/tdeunittest/Makefile.am +++ b/tdeunittest/Makefile.am @@ -10,7 +10,7 @@ libtdeunittestinclude_HEADERS = runner.h tester.h module.h libtdeunittestincludedir = $(includedir)/tdeunittest bin_PROGRAMS = tdeunittestmodrunner -tdeunittestmodrunner_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +tdeunittestmodrunner_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor tdeunittestmodrunner_LDADD = libtdeunittest.la $(LIB_TDECORE) tdeunittestmodrunner_SOURCES = modrunner.cpp diff --git a/tdeunittest/module.h b/tdeunittest/module.h index d30c248c7..071f28bf7 100644 --- a/tdeunittest/module.h +++ b/tdeunittest/module.h @@ -28,8 +28,8 @@ * Provides macros to ease building unit tests as shared libraries */ -#ifndef KUNITTEST_MODULE_H -#define KUNITTEST_MODULE_H +#ifndef TDEUNITTEST_MODULE_H +#define TDEUNITTEST_MODULE_H #include <tqstring.h> @@ -38,16 +38,16 @@ namespace KUnitTest { - /*! @def KUNITTEST_MODULE(library,suite) + /*! @def 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. * - * @code KUNITTEST_MODULE(tdeunittest_samplemodule,"TestSuite") @endcode + * @code TDEUNITTEST_MODULE(tdeunittest_samplemodule,"TestSuite") @endcode */ - #define KUNITTEST_MODULE(library,suite) \ + #define TDEUNITTEST_MODULE(library,suite) \ static const TQString s_tdeunittest_suite = TQString::fromLatin1(suite); \ class library##Module : public TQObject \ { \ @@ -80,13 +80,13 @@ namespace KUnitTest \ K_EXPORT_COMPONENT_FACTORY( library, module##Factory ) - /*! @def KUNITTEST_MODULE_REGISTER_TESTER(tester) + /*! @def TDEUNITTEST_MODULE_REGISTER_TESTER(tester) * Use this macro to add a tester class to your module. The name of the tester will * be identical to the class name. * - * @code KUNITTEST_MODULE_REGISTER_TESTER(SimpleSampleTester) @endcode + * @code TDEUNITTEST_MODULE_REGISTER_TESTER(SimpleSampleTester) @endcode */ - #define KUNITTEST_MODULE_REGISTER_TESTER( tester) \ + #define TDEUNITTEST_MODULE_REGISTER_TESTER( tester) \ static class tester##ModuleAutoregister \ { \ public: \ @@ -99,12 +99,12 @@ namespace KUnitTest } \ } tester##ModuleAutoregisterInstance; - /*! @def KUNITTEST_MODULE_REGISTER_NAMEDTESTER(name,tester) + /*! @def TDEUNITTEST_MODULE_REGISTER_NAMEDTESTER(name,tester) * Use this macro to add a tester class, with specified name, to your module.. * - * @code KUNITTEST_MODULE_REGISTER_TESTER("SubSuite::PrettyName",SimpleSampleTester) @endcode + * @code TDEUNITTEST_MODULE_REGISTER_TESTER("SubSuite::PrettyName",SimpleSampleTester) @endcode */ - #define KUNITTEST_MODULE_REGISTER_NAMEDTESTER( name , tester) \ + #define TDEUNITTEST_MODULE_REGISTER_NAMEDTESTER( name , tester) \ static class tester##ModuleAutoregister \ { \ public: \ diff --git a/tdeunittest/runner.h b/tdeunittest/runner.h index 3b1c3d90d..76c662bb7 100644 --- a/tdeunittest/runner.h +++ b/tdeunittest/runner.h @@ -30,8 +30,8 @@ * Defines a set of macros and classes for running unit tests */ -#ifndef KUNITTEST_RUNNER_H -#define KUNITTEST_RUNNER_H +#ifndef TDEUNITTEST_RUNNER_H +#define TDEUNITTEST_RUNNER_H #include <iostream> using namespace std; @@ -48,15 +48,15 @@ class TQSocketNotifier; namespace KUnitTest { - /*! @def KUNITTEST_SUITE(suite) + /*! @def TDEUNITTEST_SUITE(suite) * * This macro must be used if you are not making a test-module. The macro * defines the name of the test suite. */ - #define KUNITTEST_SUITE(suite)\ + #define TDEUNITTEST_SUITE(suite)\ static const TQString s_tdeunittest_suite = suite; - /*! @def KUNITTEST_REGISTER_TESTER( tester ) + /*! @def TDEUNITTEST_REGISTER_TESTER( tester ) * @brief Automatic registration of Tester classes. * * This macro can be used to register the Tester into the global registry. Use @@ -65,10 +65,10 @@ namespace KUnitTest * 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. */ - #define KUNITTEST_REGISTER_TESTER( tester )\ + #define TDEUNITTEST_REGISTER_TESTER( tester )\ static TesterAutoregister tester##Autoregister( TQString(s_tdeunittest_suite + TQString("::") + TQString::fromLocal8Bit(#tester)).local8Bit() , new tester ()) - #define KUNITTEST_REGISTER_NAMEDTESTER( name, tester )\ + #define TDEUNITTEST_REGISTER_NAMEDTESTER( name, tester )\ static TesterAutoregister tester##Autoregister( TQString(s_tdeunittest_suite + TQString("::") + TQString::fromLocal8Bit(name)).local8Bit() , new tester ()) /*! The type of the registry. */ @@ -90,11 +90,11 @@ namespace KUnitTest * the KUnitTest library can be kept separate from the test case sources. Test cases * (classes inheriting from Tester) can be added using the static * registerTester(const char *name, Tester *test) method. Allthough most users - * will want to use the KUNITTEST_REGISTER_TESTER macro. + * will want to use the TDEUNITTEST_REGISTER_TESTER macro. * - * @see KUNITTEST_REGISTER_TESTER + * @see TDEUNITTEST_REGISTER_TESTER */ - class KUNITTEST_EXPORT Runner : public TQObject + class TDEUNITTEST_EXPORT Runner : public TQObject { Q_OBJECT @@ -163,7 +163,7 @@ namespace KUnitTest /*! Call this slot to run a single test. * @param name The name of the test case. This name has to correspond to the name - * that was used to register the test. If the KUNITTEST_REGISTER_TESTER macro was + * that was used to register the test. If the TDEUNITTEST_REGISTER_TESTER macro was * used to register the test case then this name is the class name. */ void runTest(const char *name); diff --git a/tdeunittest/samplemodule.cpp b/tdeunittest/samplemodule.cpp index 8dede090a..0ba862c82 100644 --- a/tdeunittest/samplemodule.cpp +++ b/tdeunittest/samplemodule.cpp @@ -30,8 +30,8 @@ using namespace KUnitTest; -KUNITTEST_MODULE( tdeunittest_samplemodule, "Suite1" ); -KUNITTEST_MODULE_REGISTER_TESTER( SampleTester ); +TDEUNITTEST_MODULE( tdeunittest_samplemodule, "Suite1" ); +TDEUNITTEST_MODULE_REGISTER_TESTER( SampleTester ); void SampleTester::allTests() { diff --git a/tdeunittest/tester.h b/tdeunittest/tester.h index b0ce3e685..3f0e45acf 100644 --- a/tdeunittest/tester.h +++ b/tdeunittest/tester.h @@ -105,10 +105,10 @@ * @c operator==() defined. * * Now that you did that the only other thing to do is to tell the - * framework to add this test case, by using the KUNITTEST_REGISTER_TESTER(x) macro. Just + * framework to add this test case, by using the TDEUNITTEST_REGISTER_TESTER(x) macro. Just * put the following line in the implementation file: * - * @code KUNITTEST_REGISTER_TESTER( SampleTest ); @endcode + * @code TDEUNITTEST_REGISTER_TESTER( SampleTest ); @endcode * * Note the ;, it is necessary. * @@ -210,18 +210,18 @@ SampleTest - 1 test passed, 1 test failed * how you use them: * * @code - * KUNITTEST_MODULE( tdeunittest_samplemodule, "Tests for sample module" ); - * KUNITTEST_MODULE_REGISTER_TESTER( SimpleSampleTester ); - * KUNITTEST_MODULE_REGISTER_TESTER( SomeSampleTester ); + * TDEUNITTEST_MODULE( tdeunittest_samplemodule, "Tests for sample module" ); + * TDEUNITTEST_MODULE_REGISTER_TESTER( SimpleSampleTester ); + * TDEUNITTEST_MODULE_REGISTER_TESTER( SomeSampleTester ); * @endcode * - * The first macro, KUNITTEST_MODULE(), makes sure that the module can be loaded and that + * The first macro, TDEUNITTEST_MODULE(), makes sure that the module can be loaded and that * the test classes are created. The first argument "tdeunittest_samplemodule" is the library * name, in this case the library we're creating a tdeunittest_samplemodule.la module. The * second argument is name which will appear in the test runner for this test suite. * - * The tester class are now added by the KUNITTEST_MODULE_REGISTER_TESTER() macro, not the - * KUNITTEST_REGISTER_TESTER(). The only difference between the two is that you have to + * The tester class are now added by the TDEUNITTEST_MODULE_REGISTER_TESTER() macro, not the + * TDEUNITTEST_REGISTER_TESTER(). The only difference between the two is that you have to * pass the module class name to this macro. * * The Makefile.am is also a bit different, but not much: @@ -231,7 +231,7 @@ SampleTest - 1 test passed, 1 test failed * METASOURCES = AUTO * check_LTLIBRARIES = tdeunittest_samplemodule.la * tdeunittest_samplemodule_la_SOURCES = samplemodule.cpp - * tdeunittest_samplemodule_la_LIBADD = $(LIB_KUNITTEST) + * tdeunittest_samplemodule_la_LIBADD = $(LIB_TDEUNITTEST) * tdeunittest_samplemodule_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN) $(all_libraries) * @endcode * @@ -429,7 +429,7 @@ namespace KUnitTest * has a single TestResults instance associated with it, however the SlotTester * class can have more TestResults instances (one for each test slot in fact). */ - class KUNITTEST_EXPORT TestResults + class TDEUNITTEST_EXPORT TestResults { friend class Tester; @@ -519,7 +519,7 @@ namespace KUnitTest * * @see CHECK, XFAIL, SKIP */ - class KUNITTEST_EXPORT Tester : public TQObject + class TDEUNITTEST_EXPORT Tester : public TQObject { public: Tester(const char *name = 0L) @@ -683,7 +683,7 @@ namespace KUnitTest * execute all slots that start with the string "test". The method * void allTests() is implemented and should not be overriden. */ - class KUNITTEST_EXPORT SlotTester : public Tester + class TDEUNITTEST_EXPORT SlotTester : public Tester { Q_OBJECT @@ -707,10 +707,10 @@ namespace KUnitTest }; } -KUNITTEST_EXPORT TQTextStream& operator<<( TQTextStream& str, const TQRect& r ); +TDEUNITTEST_EXPORT TQTextStream& operator<<( TQTextStream& str, const TQRect& r ); -KUNITTEST_EXPORT TQTextStream& operator<<( TQTextStream& str, const TQPoint& r ); +TDEUNITTEST_EXPORT TQTextStream& operator<<( TQTextStream& str, const TQPoint& r ); -KUNITTEST_EXPORT TQTextStream& operator<<( TQTextStream& str, const TQSize& r ); +TDEUNITTEST_EXPORT TQTextStream& operator<<( TQTextStream& str, const TQSize& r ); #endif |