From 48087e1d5650499b6093a6816356d467c8461802 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 26 Jan 2013 13:17:46 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- kopete/protocols/gadu/Makefile.am | 2 +- kopete/protocols/groupwise/Makefile.am | 2 +- kopete/protocols/irc/Makefile.am | 2 +- kopete/protocols/jabber/Makefile.am | 2 +- kopete/protocols/jabber/kioslave/Makefile.am | 2 +- kopete/protocols/meanwhile/Makefile.am | 2 +- kopete/protocols/msn/Makefile.am | 4 +- kopete/protocols/msn/config/Makefile.am | 2 +- kopete/protocols/oscar/aim/Makefile.am | 2 +- kopete/protocols/oscar/icq/Makefile.am | 2 +- kopete/protocols/oscar/liboscar/tests/Makefile.am | 12 +- .../protocols/oscar/liboscar/tests/kunittest.cpp | 167 --------------------- kopete/protocols/oscar/liboscar/tests/kunittest.h | 72 --------- kopete/protocols/oscar/liboscar/tests/main.cpp | 2 +- .../protocols/oscar/liboscar/tests/tdeunittest.cpp | 167 +++++++++++++++++++++ .../protocols/oscar/liboscar/tests/tdeunittest.h | 72 +++++++++ kopete/protocols/testbed/Makefile.am | 2 +- kopete/protocols/winpopup/Makefile.am | 2 +- kopete/protocols/yahoo/Makefile.am | 2 +- 19 files changed, 260 insertions(+), 260 deletions(-) delete mode 100644 kopete/protocols/oscar/liboscar/tests/kunittest.cpp delete mode 100644 kopete/protocols/oscar/liboscar/tests/kunittest.h create mode 100644 kopete/protocols/oscar/liboscar/tests/tdeunittest.cpp create mode 100644 kopete/protocols/oscar/liboscar/tests/tdeunittest.h (limited to 'kopete/protocols') diff --git a/kopete/protocols/gadu/Makefile.am b/kopete/protocols/gadu/Makefile.am index 0bf17f76..442f8aea 100644 --- a/kopete/protocols/gadu/Makefile.am +++ b/kopete/protocols/gadu/Makefile.am @@ -22,7 +22,7 @@ kopete_gadu_la_SOURCES = gaduaway.cpp gadueditcontact.cpp gaducommands.cpp \ gaducontactlist.cpp gadurichtextformat.cpp \ gadudccserver.cpp gadudcctransaction.cpp gadudcc.cpp -kopete_gadu_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor -lgadu +kopete_gadu_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -lgadu kopete_gadu_la_LIBADD = ./ui/libgaduui.la \ $(top_builddir)/kopete/libkopete/libkopete.la \ $(GG_LIBS) diff --git a/kopete/protocols/groupwise/Makefile.am b/kopete/protocols/groupwise/Makefile.am index 3e44ad06..51ac5463 100644 --- a/kopete/protocols/groupwise/Makefile.am +++ b/kopete/protocols/groupwise/Makefile.am @@ -12,7 +12,7 @@ kde_module_LTLIBRARIES = kopete_groupwise.la kopete_groupwise_la_SOURCES = gwprotocol.cpp gwcontact.cpp gwaccount.cpp \ gwbytestream.cpp gwconnector.cpp gwmessagemanager.cpp gwcontactlist.cpp kopete_groupwise_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) \ - $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor + $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kopete_groupwise_la_LIBADD = ui/libkopetegroupwiseui.la \ libgroupwise/libgroupwise.la ../../libkopete/libkopete.la $(LIB_KIO) diff --git a/kopete/protocols/irc/Makefile.am b/kopete/protocols/irc/Makefile.am index 730e5352..37e27bad 100644 --- a/kopete/protocols/irc/Makefile.am +++ b/kopete/protocols/irc/Makefile.am @@ -22,7 +22,7 @@ kopete_irc_la_SOURCES = \ kcodecaction.cpp \ ksparser.cpp -kopete_irc_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor $(LIB_KHTML) +kopete_irc_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_KHTML) kopete_irc_la_LIBADD = ../../libkopete/libkopete.la \ ./ui/libkopeteircui.la \ ./libkirc/libkirc.la \ diff --git a/kopete/protocols/jabber/Makefile.am b/kopete/protocols/jabber/Makefile.am index f0c6486d..f1706949 100644 --- a/kopete/protocols/jabber/Makefile.am +++ b/kopete/protocols/jabber/Makefile.am @@ -44,7 +44,7 @@ kopete_jabber_la_SOURCES = \ jabbertransport.cpp\ jabberbookmarks.cpp -kopete_jabber_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kopete_jabber_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kopete_jabber_la_LIBADD = $(top_builddir)/kopete/libkopete/libkopete.la \ ui/libkopetejabberui.la \ libiris/iris/include/libiris.la \ diff --git a/kopete/protocols/jabber/kioslave/Makefile.am b/kopete/protocols/jabber/kioslave/Makefile.am index 3f3c0345..be3b2112 100644 --- a/kopete/protocols/jabber/kioslave/Makefile.am +++ b/kopete/protocols/jabber/kioslave/Makefile.am @@ -14,7 +14,7 @@ kde_module_LTLIBRARIES = kio_jabberdisco.la kio_jabberdisco_la_SOURCES = jabberdisco.cpp kio_jabberdisco_la_LIBADD = ../libjabberclient.la ../libiris/qca/src/libqca.la ../libiris/iris/include/libiris.la ../libiris/iris/xmpp-im/libiris_xmpp_im.la ../libiris/iris/xmpp-core/libiris_xmpp_core.la ../libiris/iris/jabber/libiris_jabber.la ../libiris/cutestuff/util/libcutestuff_util.la ../libiris/cutestuff/network/libcutestuff_network.la $(LIB_KIO) -kio_jabberdisco_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kio_jabberdisco_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor noinst_HEADERS = jabberdisco.h diff --git a/kopete/protocols/meanwhile/Makefile.am b/kopete/protocols/meanwhile/Makefile.am index 760200e3..54728267 100644 --- a/kopete/protocols/meanwhile/Makefile.am +++ b/kopete/protocols/meanwhile/Makefile.am @@ -28,7 +28,7 @@ kopete_meanwhile_la_SOURCES = \ meanwhileplugin.cpp kopete_meanwhile_la_LDFLAGS = -no-undefined -module \ - $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor + $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kopete_meanwhile_la_LIBADD = $(top_builddir)/kopete/libkopete/libkopete.la \ ui/libkopetemeanwhileui.la $(MEANWHILE_LIBS) diff --git a/kopete/protocols/msn/Makefile.am b/kopete/protocols/msn/Makefile.am index 29f25337..da3fbcb1 100644 --- a/kopete/protocols/msn/Makefile.am +++ b/kopete/protocols/msn/Makefile.am @@ -26,12 +26,12 @@ libkopete_msn_shared_la_SOURCES = msnprotocol.cpp msnaccount.cpp \ webcam.cpp libkopete_msn_shared_la_LIBADD = ./ui/libkopetemsnui.la ../../libkopete/libkopete.la $(WEBCAM_LIBMINICWRAPPER) ../../libkopete/avdevice/libkopete_videodevice.la $(LIB_KIO) -libkopete_msn_shared_la_LDFLAGS = -version-info 0:0:0 -no-undefined $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor -lkopete_videodevice -L../../libkopete/avdevice/ +libkopete_msn_shared_la_LDFLAGS = -version-info 0:0:0 -no-undefined $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -lkopete_videodevice -L../../libkopete/avdevice/ kopete_msn_la_SOURCES = dummy.cpp webcam.cpp kopete_msn_la_LIBADD = libkopete_msn_shared.la -kopete_msn_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor -lkopete_videodevice -L../../libkopete/avdevice/ +kopete_msn_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -lkopete_videodevice -L../../libkopete/avdevice/ dummy.cpp: $(srcdir)/Makefile.am echo '#include "kdemacros.h"' > $@ diff --git a/kopete/protocols/msn/config/Makefile.am b/kopete/protocols/msn/config/Makefile.am index c136b6ef..b5e2026a 100644 --- a/kopete/protocols/msn/config/Makefile.am +++ b/kopete/protocols/msn/config/Makefile.am @@ -4,7 +4,7 @@ AM_CPPFLAGS = $(KOPETE_INCLUDES) $(all_includes) kde_module_LTLIBRARIES = kcm_kopete_msn.la kcm_kopete_msn_la_SOURCES = msnprefs.ui msnpreferences.cpp -kcm_kopete_msn_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kcm_kopete_msn_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kcm_kopete_msn_la_LIBADD = ../../../libkopete/libkopete.la $(LIB_KUTILS) service_DATA = kopete_msn_config.desktop diff --git a/kopete/protocols/oscar/aim/Makefile.am b/kopete/protocols/oscar/aim/Makefile.am index 1ecf5fe5..616a5501 100644 --- a/kopete/protocols/oscar/aim/Makefile.am +++ b/kopete/protocols/oscar/aim/Makefile.am @@ -10,7 +10,7 @@ kde_module_LTLIBRARIES = kopete_aim.la kopete_aim_la_SOURCES = aimprotocol.cpp aimaccount.cpp aimcontact.cpp aimuserinfo.cpp aimjoinchat.cpp aimchatsession.cpp -kopete_aim_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kopete_aim_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kopete_aim_la_LIBADD = ../libkopete_oscar.la ui/libkopeteaimui.la \ $(top_builddir)/kopete/libkopete/libkopete.la diff --git a/kopete/protocols/oscar/icq/Makefile.am b/kopete/protocols/oscar/icq/Makefile.am index 3505909c..dc2e491a 100644 --- a/kopete/protocols/oscar/icq/Makefile.am +++ b/kopete/protocols/oscar/icq/Makefile.am @@ -11,7 +11,7 @@ kde_module_LTLIBRARIES = kopete_icq.la kopete_icq_la_SOURCES = icqpresence.cpp icqaccount.cpp icqcontact.cpp icqprotocol.cpp # icquserinfo.cpp icqreadaway.cpp icqsendsmsdialog.cpp -kopete_icq_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kopete_icq_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kopete_icq_la_LIBADD = ../libkopete_oscar.la \ $(top_builddir)/kopete/libkopete/libkopete.la ui/libkopeteicqui.la diff --git a/kopete/protocols/oscar/liboscar/tests/Makefile.am b/kopete/protocols/oscar/liboscar/tests/Makefile.am index 57f993f2..2e1fad6a 100644 --- a/kopete/protocols/oscar/liboscar/tests/Makefile.am +++ b/kopete/protocols/oscar/liboscar/tests/Makefile.am @@ -1,10 +1,10 @@ INCLUDES = $(all_includes) $(KOPETE_INCLUDES) -I$(top_srcdir)/kopete/protocols/oscar/liboscar METASOURCES = AUTO -check_PROGRAMS = kunittest clientstream_test logintest userinfotest ssigrouptest redirecttest ipaddrtest +check_PROGRAMS = tdeunittest clientstream_test logintest userinfotest ssigrouptest redirecttest ipaddrtest -kunittest_SOURCES = main.cpp kunittest.cpp chatnavtests.cpp -kunittest_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor -kunittest_LDADD = $(LIB_TDECORE) ../liboscar.la +tdeunittest_SOURCES = main.cpp tdeunittest.cpp chatnavtests.cpp +tdeunittest_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +tdeunittest_LDADD = $(LIB_TDECORE) ../liboscar.la clientstream_test_SOURCES = clientstream_test.cpp clientstream_test_LDADD = $(LIB_QT) $(LIB_TDECORE) ../liboscar.la @@ -24,5 +24,5 @@ redirecttest_LDADD = $(LIB_QT) $(LIB_TDECORE) ../liboscar.la ipaddrtest_SOURCES = ipaddrtest.cpp ipaddrtest_LDADD = $(LIB_QT) $(LIB_TDECORE) ../liboscar.la -check: kunittest - @./kunittest 2>&1 | grep "tests:" +check: tdeunittest + @./tdeunittest 2>&1 | grep "tests:" diff --git a/kopete/protocols/oscar/liboscar/tests/kunittest.cpp b/kopete/protocols/oscar/liboscar/tests/kunittest.cpp deleted file mode 100644 index d40f0069..00000000 --- a/kopete/protocols/oscar/liboscar/tests/kunittest.cpp +++ /dev/null @@ -1,167 +0,0 @@ -/** - * kunittest.cpp - * - * Copyright (C) 2004 Zack Rusin - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include "kunittest.h" - -#include "tester.h" -#include "chatnavtests.h" - -#include -#include - -#include -using namespace std; - -void KUnitTest::registerTests() -{ - ADD_TEST( ChatNavTests ); -// ADD_TEST( SampleTest ); -// ADD_TEST( OnePassTest ); -// ADD_TEST( TwoPassTest ); -// ADD_TEST( MultiFailTest ); -// ADD_TEST( ExpectedFailureTest ); -// ADD_TEST( UnexpectedPassTest ); -// ADD_TEST( OnlyUnexpectedPassTest ); -// ADD_TEST( SkipLogTest ); -// ADD_TEST( SkipWithFailTest ); -} - -KUnitTest::KUnitTest() -{ - TQTimer::singleShot( 0, this, TQT_SLOT(checkRun()) ); - - m_tests.setAutoDelete( TRUE ); -// m_qtests.setAutoDelete( TRUE ); - - registerTests(); -} - -void KUnitTest::checkRun() -{ -// if ( m_qtests.isEmpty() ) -// tqApp->exit(); -} - -int KUnitTest::runTests() -{ - int globalSteps = 0; - int globalPasses = 0; - int globalFails = 0; - int globalXFails = 0; - int globalXPasses = 0; - int globalSkipped = 0; - - cout << "# Running normal tests... #" << endl << endl; - TQAsciiDictIterator it( m_tests ); - - for( ; it.current(); ++it ) { - Tester* test = it.current(); - test->allTests(); - cout << it.currentKey() << " - "; - int numPass = test->testsFinished() - ( test->errorList().count() + test->xfailList().count() + test->skipList().count() ); - int numFail = test->errorList().count() + test->xfailList().count(); - int numXFail = test->xfailList().count(); - int numXPass = test->xpassList().count(); - int numSkip = test->skipList().count(); - - globalSteps += test->testsFinished(); - globalPasses += numPass; - globalFails += numFail; - globalXFails += numXFail; - globalXPasses += numXPass; - globalSkipped += numSkip; - - cout << numPass << " test" << ( ( 1 == numPass )?"":"s") << " passed"; - if ( 0 < test->xpassList().count() ) { - cout << " (" << numXPass << " unexpected pass" << ( ( 1 == numXPass )?"":"es") << ")"; - } - cout << ", " << numFail << " test" << ( ( 1 == numFail )?"":"s") << " failed"; - if ( 0 < numXFail ) { - cout << " (" << numXFail << " expected failure" << ( ( 1 == numXFail )?"":"s") << ")"; - } - if ( 0 < numSkip ) { - cout << "; also " << numSkip << " skipped"; - } - cout << endl; - - if ( 0 < numXPass ) { - cout << " Unexpected pass" << ( ( 1 == numXPass )?"":"es") << ":" << endl; - TQStringList list = test->xpassList(); - for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { - cout << "\t" << (*itr).latin1() << endl; - } - } - if ( 0 < (numFail - numXFail) ) { - cout << " Unexpected failure" << ( ( 1 == numFail )?"":"s") << ":" << endl; - TQStringList list = test->errorList(); - for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { - cout << "\t" << (*itr).latin1() << endl; - } - } - if ( 0 < numXFail ) { - cout << " Expected failure" << ( ( 1 == numXFail)?"":"s") << ":" << endl; - TQStringList list = test->xfailList(); - for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { - cout << "\t" << (*itr).latin1() << endl; - } - } - if ( 0 < numSkip ) { - cout << " Skipped test" << ( ( 1 == numSkip )?"":"s") << ":" << endl; - TQStringList list = test->skipList(); - for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { - cout << "\t" << (*itr).latin1() << endl; - } - } - cout << endl; - } - - cout << "# Done with normal tests:" << endl; - cout << " Total test cases: " << m_tests.count() << endl; - cout << " Total test steps : " << globalSteps << endl; - cout << " Total passed test steps (including unexpected) : " << globalPasses << endl; - cout << " Total unexpected passed test steps : " << globalXPasses << endl; - cout << " Total failed test steps (including expected) : " << globalFails << endl; - cout << " Total expected failed test steps : " << globalXFails << endl; - cout << " Total skipped test steps : " << globalSkipped << endl; - - return m_tests.count(); -} - -//void KUnitTest::addTester( TQTester *test ) -//{ -// m_qtests.insert( test, test ); -// connect( test, TQT_SIGNAL(destroyed(TQObject*)), -// TQT_SLOT(qtesterDone(TQObject* )) ); -//} - -void KUnitTest::qtesterDone( TQObject *obj ) -{ -// m_qtests.remove( obj ); -// if ( m_qtests.isEmpty() ) -// tqApp->quit(); -} - -#include "kunittest.moc" diff --git a/kopete/protocols/oscar/liboscar/tests/kunittest.h b/kopete/protocols/oscar/liboscar/tests/kunittest.h deleted file mode 100644 index b5173e1a..00000000 --- a/kopete/protocols/oscar/liboscar/tests/kunittest.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - * kunittest.h - * - * Copyright (C) 2004 Zack Rusin - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef KUNITTEST_H -#define KUNITTEST_H - -#include "tester.h" - -#include -#include -#include - -#define ADD_TEST(x) addTester( #x, new x ) -#define ADD_TQTEST(x) addTester( new x ) - -class KUnitTest : public TQObject -{ - Q_OBJECT - -public: - KUnitTest(); - - int runTests(); -public: - void addTester( const char *name, Tester* test ) - { - m_tests.insert( name, test ); - } -// void addTester( TQTester *test ); - -private slots: - void qtesterDone( TQObject *obj ); - void checkRun(); - -private: - void registerTests(); - -private: - TQAsciiDict m_tests; -// TQPtrDict m_qtests; - int globalTests; - int globalPasses; - int globalFails; - int globalXFails; - int globalXPasses; - int globalSkipped; -}; - -#endif diff --git a/kopete/protocols/oscar/liboscar/tests/main.cpp b/kopete/protocols/oscar/liboscar/tests/main.cpp index 49966924..03138cd1 100644 --- a/kopete/protocols/oscar/liboscar/tests/main.cpp +++ b/kopete/protocols/oscar/liboscar/tests/main.cpp @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "kunittest.h" +#include "tdeunittest.h" int main( int argc, char** argv ) { diff --git a/kopete/protocols/oscar/liboscar/tests/tdeunittest.cpp b/kopete/protocols/oscar/liboscar/tests/tdeunittest.cpp new file mode 100644 index 00000000..d634f5b9 --- /dev/null +++ b/kopete/protocols/oscar/liboscar/tests/tdeunittest.cpp @@ -0,0 +1,167 @@ +/** + * tdeunittest.cpp + * + * Copyright (C) 2004 Zack Rusin + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "tdeunittest.h" + +#include "tester.h" +#include "chatnavtests.h" + +#include +#include + +#include +using namespace std; + +void KUnitTest::registerTests() +{ + ADD_TEST( ChatNavTests ); +// ADD_TEST( SampleTest ); +// ADD_TEST( OnePassTest ); +// ADD_TEST( TwoPassTest ); +// ADD_TEST( MultiFailTest ); +// ADD_TEST( ExpectedFailureTest ); +// ADD_TEST( UnexpectedPassTest ); +// ADD_TEST( OnlyUnexpectedPassTest ); +// ADD_TEST( SkipLogTest ); +// ADD_TEST( SkipWithFailTest ); +} + +KUnitTest::KUnitTest() +{ + TQTimer::singleShot( 0, this, TQT_SLOT(checkRun()) ); + + m_tests.setAutoDelete( TRUE ); +// m_qtests.setAutoDelete( TRUE ); + + registerTests(); +} + +void KUnitTest::checkRun() +{ +// if ( m_qtests.isEmpty() ) +// tqApp->exit(); +} + +int KUnitTest::runTests() +{ + int globalSteps = 0; + int globalPasses = 0; + int globalFails = 0; + int globalXFails = 0; + int globalXPasses = 0; + int globalSkipped = 0; + + cout << "# Running normal tests... #" << endl << endl; + TQAsciiDictIterator it( m_tests ); + + for( ; it.current(); ++it ) { + Tester* test = it.current(); + test->allTests(); + cout << it.currentKey() << " - "; + int numPass = test->testsFinished() - ( test->errorList().count() + test->xfailList().count() + test->skipList().count() ); + int numFail = test->errorList().count() + test->xfailList().count(); + int numXFail = test->xfailList().count(); + int numXPass = test->xpassList().count(); + int numSkip = test->skipList().count(); + + globalSteps += test->testsFinished(); + globalPasses += numPass; + globalFails += numFail; + globalXFails += numXFail; + globalXPasses += numXPass; + globalSkipped += numSkip; + + cout << numPass << " test" << ( ( 1 == numPass )?"":"s") << " passed"; + if ( 0 < test->xpassList().count() ) { + cout << " (" << numXPass << " unexpected pass" << ( ( 1 == numXPass )?"":"es") << ")"; + } + cout << ", " << numFail << " test" << ( ( 1 == numFail )?"":"s") << " failed"; + if ( 0 < numXFail ) { + cout << " (" << numXFail << " expected failure" << ( ( 1 == numXFail )?"":"s") << ")"; + } + if ( 0 < numSkip ) { + cout << "; also " << numSkip << " skipped"; + } + cout << endl; + + if ( 0 < numXPass ) { + cout << " Unexpected pass" << ( ( 1 == numXPass )?"":"es") << ":" << endl; + TQStringList list = test->xpassList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + cout << "\t" << (*itr).latin1() << endl; + } + } + if ( 0 < (numFail - numXFail) ) { + cout << " Unexpected failure" << ( ( 1 == numFail )?"":"s") << ":" << endl; + TQStringList list = test->errorList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + cout << "\t" << (*itr).latin1() << endl; + } + } + if ( 0 < numXFail ) { + cout << " Expected failure" << ( ( 1 == numXFail)?"":"s") << ":" << endl; + TQStringList list = test->xfailList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + cout << "\t" << (*itr).latin1() << endl; + } + } + if ( 0 < numSkip ) { + cout << " Skipped test" << ( ( 1 == numSkip )?"":"s") << ":" << endl; + TQStringList list = test->skipList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + cout << "\t" << (*itr).latin1() << endl; + } + } + cout << endl; + } + + cout << "# Done with normal tests:" << endl; + cout << " Total test cases: " << m_tests.count() << endl; + cout << " Total test steps : " << globalSteps << endl; + cout << " Total passed test steps (including unexpected) : " << globalPasses << endl; + cout << " Total unexpected passed test steps : " << globalXPasses << endl; + cout << " Total failed test steps (including expected) : " << globalFails << endl; + cout << " Total expected failed test steps : " << globalXFails << endl; + cout << " Total skipped test steps : " << globalSkipped << endl; + + return m_tests.count(); +} + +//void KUnitTest::addTester( TQTester *test ) +//{ +// m_qtests.insert( test, test ); +// connect( test, TQT_SIGNAL(destroyed(TQObject*)), +// TQT_SLOT(qtesterDone(TQObject* )) ); +//} + +void KUnitTest::qtesterDone( TQObject *obj ) +{ +// m_qtests.remove( obj ); +// if ( m_qtests.isEmpty() ) +// tqApp->quit(); +} + +#include "tdeunittest.moc" diff --git a/kopete/protocols/oscar/liboscar/tests/tdeunittest.h b/kopete/protocols/oscar/liboscar/tests/tdeunittest.h new file mode 100644 index 00000000..d3ceee97 --- /dev/null +++ b/kopete/protocols/oscar/liboscar/tests/tdeunittest.h @@ -0,0 +1,72 @@ +/** + * tdeunittest.h + * + * Copyright (C) 2004 Zack Rusin + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef KUNITTEST_H +#define KUNITTEST_H + +#include "tester.h" + +#include +#include +#include + +#define ADD_TEST(x) addTester( #x, new x ) +#define ADD_TQTEST(x) addTester( new x ) + +class KUnitTest : public TQObject +{ + Q_OBJECT + +public: + KUnitTest(); + + int runTests(); +public: + void addTester( const char *name, Tester* test ) + { + m_tests.insert( name, test ); + } +// void addTester( TQTester *test ); + +private slots: + void qtesterDone( TQObject *obj ); + void checkRun(); + +private: + void registerTests(); + +private: + TQAsciiDict m_tests; +// TQPtrDict m_qtests; + int globalTests; + int globalPasses; + int globalFails; + int globalXFails; + int globalXPasses; + int globalSkipped; +}; + +#endif diff --git a/kopete/protocols/testbed/Makefile.am b/kopete/protocols/testbed/Makefile.am index e68fe392..f7da072c 100644 --- a/kopete/protocols/testbed/Makefile.am +++ b/kopete/protocols/testbed/Makefile.am @@ -7,7 +7,7 @@ AM_CPPFLAGS = $(KOPETE_INCLUDES) -I$(srcdir)/ui -Iui $(all_includes) noinst_HEADERS = testbedprotocol.h testbedcontact.h testbedaccount.h testbedaddcontactpage.h testbededitaccountwidget.h testbedfakeserver.h testbedincomingmessage.h kde_module_LTLIBRARIES = kopete_testbed.la kopete_testbed_la_SOURCES = testbedprotocol.cpp testbedcontact.cpp testbedaccount.cpp testbedaddcontactpage.cpp testbedaddui.ui testbededitaccountwidget.cpp testbedaccountpreferences.ui testbedfakeserver.cpp testbedincomingmessage.cpp -kopete_testbed_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kopete_testbed_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kopete_testbed_la_LIBADD = ../../libkopete/avdevice/libkopete_videodevice.la \ ui/libkopetetestbedui.la ../../libkopete/libkopete.la $(LIB_KIO) diff --git a/kopete/protocols/winpopup/Makefile.am b/kopete/protocols/winpopup/Makefile.am index e80e8265..2bb8a143 100644 --- a/kopete/protocols/winpopup/Makefile.am +++ b/kopete/protocols/winpopup/Makefile.am @@ -11,7 +11,7 @@ kde_module_LTLIBRARIES = kopete_wp.la noinst_HEADERS = wpprotocol.h wpeditaccount.h wpaccount.h wpuserinfo.h wpcontact.h wpaddcontact.h kopete_wp_la_SOURCES = wpprotocol.cpp wpcontact.cpp wpaddcontact.cpp wpeditaccount.cpp wpaccount.cpp wpuserinfo.cpp -kopete_wp_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kopete_wp_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kopete_wp_la_LIBADD = ../../libkopete/libkopete.la ./ui/libkopetewpui.la \ ./libwinpopup/libwinpopup.la $(LIB_KIO) diff --git a/kopete/protocols/yahoo/Makefile.am b/kopete/protocols/yahoo/Makefile.am index ce246298..384188a9 100644 --- a/kopete/protocols/yahoo/Makefile.am +++ b/kopete/protocols/yahoo/Makefile.am @@ -12,7 +12,7 @@ kde_module_LTLIBRARIES = kopete_yahoo.la kopete_yahoo_la_SOURCES = yahooprotocol.cpp yahoocontact.cpp \ yahooaddcontact.cpp yahooaccount.cpp yahooeditaccount.cpp yahooconferencemessagemanager.cpp \ yahoochatsession.cpp yahooverifyaccount.cpp yahoowebcam.cpp -kopete_yahoo_la_LDFLAGS = -module $(KDE_PLUGIN) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kopete_yahoo_la_LDFLAGS = -module $(KDE_PLUGIN) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kopete_yahoo_la_LIBADD = ../../libkopete/avdevice/libkopete_videodevice.la \ $(top_builddir)/kopete/libkopete/libkopete.la ui/libkopeteyahooui.la libkyahoo/libkyahoo.la -- cgit v1.2.1