0c64a776 | 2017-01-28 19:27:14 | Alexander Golubev |
Initial add for check target for cmake Signed-off-by: Alexander Golubev <fatzer2@...> |
||
A tdecore/tests/CMakeLists.txt M CMakeLists.txt M tdecore/CMakeLists.txt M tdecore/tdeaccelmanager.cpp M tdecore/tests/kdebugtest.cpp M tdecore/tests/kiconloadertest.cpp M tdecore/tests/kipctest.cpp M tdecore/tests/klocaletest.cpp M tdecore/tests/kmemtest.cpp M tdecore/tests/knotifytest.cpp M tdecore/tests/kprocesstest.cpp M tdecore/tests/kprociotest.cpp M tdecore/tests/krandomsequencetest.cpp M tdecore/tests/kresolvertest.cpp M tdecore/tests/kshelltest.cpp M tdecore/tests/ksimpleconfigtest.cpp M tdecore/tests/kstringhandlertest.cpp M tdecore/tests/ktempfiletest.cpp M tdecore/tests/ktimezonestest.cpp M tdecore/tests/tdeconfigtestgui.cpp |
||
diff --git a/CMakeLists.txt b/CMakeLists.txt index 18c6dcf..c6fa9ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,7 @@ tde_setup_paths( ) tde_setup_architecture_flags( ) +enable_testing( ) find_package( TQt ) list( APPEND TDECORE_LIBRARY_DIRS ${TQT_LIBRARY_DIRS} ) diff --git a/tdecore/CMakeLists.txt b/tdecore/CMakeLists.txt index 4d9c4a4..dd9bbe7 100644 --- a/tdecore/CMakeLists.txt +++ b/tdecore/CMakeLists.txt @@ -12,6 +12,7 @@ add_subdirectory( malloc ) add_subdirectory( network ) add_subdirectory( tdeconfig_compiler ) +add_subdirectory( tests ) if( WITH_TDEHWLIB ) add_subdirectory( tdehw ) diff --git a/tdecore/tdeaccelmanager.cpp b/tdecore/tdeaccelmanager.cpp index 5fcfcc4..4618dab 100644 --- a/tdecore/tdeaccelmanager.cpp +++ b/tdecore/tdeaccelmanager.cpp @@ -47,7 +47,6 @@ #include "tdeaccelmanager_private.h" #include "../tdeui/kstdaction_p.h" -#include "../tdeutils/tdemultitabbar.h" /********************************************************************* @@ -321,7 +320,7 @@ if (dynamic_cast<TQComboBox*>(w) || dynamic_cast<TQLineEdit*>(w) || dynamic_cast<TQTextEdit*>(w) || dynamic_cast<TQTextView*>(w) || - dynamic_cast<TQSpinBox*>(w) || static_cast<KMultiTabBar*>(w->tqt_cast("KMultiTabBar"))) + dynamic_cast<TQSpinBox*>(w) || w->tqt_cast("KMultiTabBar")) return; // now treat 'ordinary' widgets diff --git a/tdecore/tests/CMakeLists.txt b/tdecore/tests/CMakeLists.txt new file mode 100644 index 0000000..7e16a6d --- /dev/null +++ b/tdecore/tests/CMakeLists.txt @@ -0,0 +1,56 @@ +################################################# +# +# (C) 2016 Alexander Golubev +# fatzer2 (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${TQT_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/tdecore + ${CMAKE_SOURCE_DIR}/dcop +) + +link_directories( + ${TDECORE_LIBRARY_DIRS} +) + +tde_add_library( tdeconfigtest SHARED AUTOMOC + SOURCES tdeconfigtest.cpp + LINK tdeunittest-shared + EXCLUDE_FROM_ALL +) + +set( CHECKS + tdeconfigtestgui klocaletest kprocesstest ksimpleconfigtest kstddirstest + kurltest kuniqueapptest ktempfiletest krandomsequencetest kdebugtest + ksocktest kstringhandlertest kcmdlineargstest kapptest kmemtest + dcopkonqtest kipctest cplusplustest kiconloadertest kresolvertest + kmdcodectest knotifytest ksortablevaluelisttest krfcdatetest testqtargs + kprociotest kcharsetstest kcalendartest kmacroexpandertest kshelltest + kxerrorhandlertest startserviceby tdestdacceltest kglobaltest ktimezonestest +) + +set( TESTS kurltest tdestdacceltest ) + +foreach( _check ${CHECKS} ) + tde_add_check_executable( ${_check} AUTOMOC LINK tdeconfigtest-shared ) +endforeach( ) + +tde_add_check_executable( kidlservertest AUTOMOC SOURCES KIDLTest.cpp KIDLTest.skel + LINK tdeconfigtest-shared ) +tde_add_check_executable( kidlclienttest AUTOMOC SOURCES KIDLTestClient.cpp + KIDLTest.stub LINK tdeconfigtest-shared ) + +foreach( _test ${TESTS}) + add_test( ${_test} ${_test} ) +endforeach( ) diff --git a/tdecore/tests/kdebugtest.cpp b/tdecore/tests/kdebugtest.cpp index cc85b45..4052d5d 100644 --- a/tdecore/tests/kdebugtest.cpp +++ b/tdecore/tests/kdebugtest.cpp @@ -59,7 +59,7 @@ il << 1 << 2 << 3 << 4 << 5; kdDebug() << "TQValueList<int> filled: " << il << endl; - Q_LLONG big = 65536LL*65536*500; + TQ_LLONG big = 65536LL*65536*500; kdDebug() << big << endl; TQVariant v( 0.12345 ); diff --git a/tdecore/tests/kiconloadertest.cpp b/tdecore/tests/kiconloadertest.cpp index c6da199..5c9e65a 100644 --- a/tdecore/tests/kiconloadertest.cpp +++ b/tdecore/tests/kiconloadertest.cpp @@ -7,7 +7,7 @@ int main(int argc, char *argv[]) { - TDEApplication app(argc,argv,"kiconloadertest"/*,false,false*/); + TDEApplication app(argc,argv,TQCString("kiconloadertest")/*,false,false*/); TDEIconLoader * mpLoader = TDEGlobal::iconLoader(); TDEIcon::Context mContext = TDEIcon::Application; diff --git a/tdecore/tests/kipctest.cpp b/tdecore/tests/kipctest.cpp index af6785f..d1a678a 100644 --- a/tdecore/tests/kipctest.cpp +++ b/tdecore/tests/kipctest.cpp @@ -18,7 +18,7 @@ int main(int argc, char **argv) { - TDEApplication app(argc, argv, "kipc"); + TDEApplication app(argc, argv, TQCString("kipc")); if (argc == 3) { diff --git a/tdecore/tests/klocaletest.cpp b/tdecore/tests/klocaletest.cpp index 2b02c22..5f4d1da 100644 --- a/tdecore/tests/klocaletest.cpp +++ b/tdecore/tests/klocaletest.cpp @@ -100,7 +100,7 @@ int main( int argc, char ** argv ) { TDELocale::setMainCatalogue("tdelibs"); - TDEApplication a( argc, argv, "klocaletest" ); + TDEApplication a( argc, argv, TQCString("klocaletest") ); TDEGlobal::locale()->setLanguage(TQString::fromLatin1("en_US")); TDEGlobal::locale()->setCountry(TQString::fromLatin1("C")); diff --git a/tdecore/tests/kmemtest.cpp b/tdecore/tests/kmemtest.cpp index f0115b5..c36fac5 100644 --- a/tdecore/tests/kmemtest.cpp +++ b/tdecore/tests/kmemtest.cpp @@ -235,7 +235,7 @@ } // showMem("second"); - TDEApplication app(argc,argv,"kurltest"); + TDEApplication app(argc,argv,TQCString("kurltest")); // showMem("After TDEApplication constructor"); diff --git a/tdecore/tests/knotifytest.cpp b/tdecore/tests/knotifytest.cpp index 6c5af25..2ccd1f9 100644 --- a/tdecore/tests/knotifytest.cpp +++ b/tdecore/tests/knotifytest.cpp @@ -3,7 +3,7 @@ int main( int argc, char **argv ) { - TDEApplication app( argc, argv, "knotifytest" ); + TDEApplication app( argc, argv, TQCString("knotifytest") ); KNotifyClient::userEvent( "This is a notification to notify you :)", KNotifyClient::Messagebox, KNotifyClient::Error ); diff --git a/tdecore/tests/kprocesstest.cpp b/tdecore/tests/kprocesstest.cpp index c81dada..d8d86d9 100644 --- a/tdecore/tests/kprocesstest.cpp +++ b/tdecore/tests/kprocesstest.cpp @@ -34,7 +34,7 @@ { TDEProcess p1, p2, p3, p4; Dummy dummy; - TDEApplication app(argc, argv, "kprocesstest"); + TDEApplication app(argc, argv, TQCString("kprocesstest")); printf("Welcome to the TDEProcess Demo Application!\n"); diff --git a/tdecore/tests/kprociotest.cpp b/tdecore/tests/kprociotest.cpp index ee7aaf2..f7e8953 100644 --- a/tdecore/tests/kprociotest.cpp +++ b/tdecore/tests/kprociotest.cpp @@ -32,7 +32,7 @@ int main(int argc, char *argv[]) { Dummy dummy; - TDEApplication app(argc, argv, "kprociotest"); + TDEApplication app(argc, argv, TQCString("kprociotest")); printf("Welcome to the KProcIO Demo Application!\n"); diff --git a/tdecore/tests/krandomsequencetest.cpp b/tdecore/tests/krandomsequencetest.cpp index 2ba0c72..44f1ce1 100644 --- a/tdecore/tests/krandomsequencetest.cpp +++ b/tdecore/tests/krandomsequencetest.cpp @@ -26,7 +26,7 @@ int main(int argc, char *argv[]) { - TDEApplication a(argc, argv, "krandomsequencetest"); + TDEApplication a(argc, argv, TQCString("krandomsequencetest")); long seed; KRandomSequence seq; diff --git a/tdecore/tests/kresolvertest.cpp b/tdecore/tests/kresolvertest.cpp index 0e05cab..9f476cd 100644 --- a/tdecore/tests/kresolvertest.cpp +++ b/tdecore/tests/kresolvertest.cpp @@ -176,17 +176,17 @@ printf("succeeded\n"); if (getsockname(sock, (struct sockaddr*)&sin6, &len) == 0) - printf("\tSize of kernel's sockaddr_in6 is %d bytes\n", len); + printf("\tSize of kernel's sockaddr_in6 is %lu bytes\n", (unsigned long)len); else printf("\tCould not get socket name\n"); } - printf("\tSize of TDE's internal sockaddr_in6 is %d bytes\n", - sizeof(kde_sockaddr_in6)); + printf("\tSize of TDE's internal sockaddr_in6 is %lu bytes\n", + (unsigned long)sizeof(kde_sockaddr_in6)); # ifdef HAVE_SOCKADDR_IN6 - printf("\tSize of system libraries' sockaddr_in6 is %d bytes\n", - sizeof(sockaddr_in6)); + printf("\tSize of system libraries' sockaddr_in6 is %lu bytes\n", + (unsigned long)sizeof(sockaddr_in6)); # else printf("\tSystem libraries don't define sockaddr_in6\n"); ** Diff limit reached (max: 250 lines) ** |
||
26d76a4c | 2017-01-28 19:27:14 | Alexander Golubev |
Add dcop tests to cmake Signed-off-by: Alexander Golubev <fatzer2@...> |
||
A dcop/tests/CMakeLists.txt M dcop/CMakeLists.txt M dcop/tests/driver.cpp M dcop/tests/generate.pl M dcop/tests/run-tests.sh M dcop/tests/testcases |
||
** Diff limit reached (max: 250 lines) ** |
||
e0b89279 | 2017-01-28 19:27:14 | Alexander Golubev |
Fix a couple of harmless warnings Signed-off-by: Alexander Golubev <fatzer2@...> |
||
M dcop/client/marshall.cpp M tdeabc/ldapurl.h |
||
** Diff limit reached (max: 250 lines) ** |
||
8e14cc0e | 2017-01-28 19:27:15 | Alexander Golubev |
Add tdeabc tests to cmake Signed-off-by: Alexander Golubev <fatzer2@...> |
||
M tdeabc/tests/CMakeLists.txt |
||
** Diff limit reached (max: 250 lines) ** |
||
7f6c0b1c | 2017-01-28 19:27:15 | Alexander Golubev |
Make dcop tests run without X Signed-off-by: Alexander Golubev <fatzer2@...> |
||
M dcop/tests/driver.cpp M dcop/tests/run-tests.sh M dcop/tests/test.cpp |
||
** Diff limit reached (max: 250 lines) ** |
||
6c1b8a75 | 2017-01-28 19:27:15 | Alexander Golubev |
Include module into test names Signed-off-by: Alexander Golubev <fatzer2@...> |
||
M dcop/tests/CMakeLists.txt M tdeabc/tests/CMakeLists.txt M tdecore/tests/CMakeLists.txt |
||
** Diff limit reached (max: 250 lines) ** |
||
5842fb37 | 2017-01-28 19:27:15 | Alexander Golubev |
tdecore: fix a crash of dcop non-GUI apps without X Previously non-GUI apps crashed on TDEApplication::updateUserTimestamp callback when receiving a DCOP message. Signed-off-by: Alexander Golubev <fatzer2@...> |
||
M tdecore/tdeapplication.cpp |
||
** Diff limit reached (max: 250 lines) ** |
||
37c9f23d | 2017-01-28 19:27:15 | Alexander Golubev |
tdeabc: make the testldapclient app non-gui Signed-off-by: Alexander Golubev <fatzer2@...> |
||
M tdeabc/tests/testldapclient.cpp |
||
** Diff limit reached (max: 250 lines) ** |
||
64b2c528 | 2017-01-28 19:27:15 | Alexander Golubev |
tdeabc: update the tests for vcardparser to run them in a new way Signed-off-by: Alexander Golubev <fatzer2@...> |
||
M tdeabc/vcardparser/CMakeLists.txt M tdeabc/vcardparser/testread2.cpp |
||
** Diff limit reached (max: 250 lines) ** |
||
7e73e618 | 2017-01-28 19:27:15 | Alexander Golubev |
testing: add TEST argument to tde_add_check_executable() macro Signed-off-by: Alexander Golubev <fatzer2@...> |
||
M tdeabc/tests/CMakeLists.txt M tdecore/tests/CMakeLists.txt |
||
** Diff limit reached (max: 250 lines) ** |
||
57e73e9e | 2017-01-28 19:27:15 | Alexander Golubev |
tdecore/tdeconfig_compiler: add check/test executables Signed-off-by: Alexander Golubev <fatzer2@...> |
||
M tdecore/tdeconfig_compiler/CMakeLists.txt M tdecore/tdeconfig_compiler/tests/test1.kcfg M tdecore/tdeconfig_compiler/tests/test4.cpp.ref M tdecore/tdeconfig_compiler/tests/test4.kcfg M tdecore/tdeconfig_compiler/tests/test5.cpp.ref M tdecore/tdeconfig_compiler/tests/test5.kcfg M tdecore/tdeconfig_compiler/tests/test9.kcfg |
||
** Diff limit reached (max: 250 lines) ** |
||
f2d8e88f | 2017-01-28 19:27:15 | Alexander Golubev |
dcop/tests: run dcop tests in a safer manner Signed-off-by: Alexander Golubev <fatzer2@...> |
||
M dcop/tests/CMakeLists.txt M dcop/tests/generate.pl M dcop/tests/run-tests.sh |
||
** Diff limit reached (max: 250 lines) ** |
||
d556a875 | 2017-01-28 19:27:15 | Alexander Golubev |
fixup! tdecore/tdeconfig_compiler: add check/test executables Signed-off-by: Alexander Golubev <fatzer2@...> |
||
A tdecore/tdeconfig_compiler/tests/CMakeLists.txt |
||
** Diff limit reached (max: 250 lines) ** |
||
ed74769b | 2017-01-28 19:27:15 | Alexander Golubev |
tdeio: add tests Signed-off-by: Alexander Golubev <fatzer2@...> |
||
A tdeio/tdefile/tests/CMakeLists.txt A tdeio/tdefile/tests/tdefilenotifytest.cpp M tdeio/tdefile/CMakeLists.txt M tdeio/tdefile/tests/kcustommenueditortest.cpp M tdeio/tdefile/tests/kdirselectdialogtest.cpp M tdeio/tdefile/tests/kfstest.cpp M tdeio/tdefile/tests/kicondialogtest.cpp M tdeio/tdefile/tests/kopenwithtest.cpp M tdeio/tdefile/tests/kurlrequestertest.cpp M tdeio/tdefile/tests/tdefiletreeviewtest.cpp M tdeio/tdeio/dataprotocol.cpp M tdeio/tests/CMakeLists.txt M tdeio/tests/dataprotocoltest.cpp M tdeio/tests/getalltest.cpp M tdeio/tests/jobtest.cpp M tdeio/tests/kacltest.cpp M tdeio/tests/kdcopcheck.cpp M tdeio/tests/kdefaultprogresstest.cpp M tdeio/tests/kdirlistertest.cpp M tdeio/tests/kmimetypetest.cpp M tdeio/tests/kprotocolinfotest.cpp M tdeio/tests/kruntest.cpp M tdeio/tests/kscantest.cpp M tdeio/tests/kurifiltertest.cpp M tdeio/tests/kurlcompletiontest.cpp M tdeio/tests/netaccesstest.cpp M tdeio/tests/previewtest.cpp M tdeio/tests/tdeioslavetest.cpp M tdeio/tests/tdesycocatest.cpp M tdeio/tests/tdesycocaupdatetest.cpp R tdeio/tdefile/tests/knotifytest.cpp |
||
** Diff limit reached (max: 250 lines) ** |
||
16a176da | 2017-01-28 19:27:15 | Alexander Golubev |
tdeui & tdewallet: add tests Signed-off-by: Alexander Golubev <fatzer2@...> |
||
A tdewallet/backend/tests/CMakeLists.txt A tdewallet/tests/CMakeLists.txt M tdeui/tests/CMakeLists.txt M tdewallet/CMakeLists.txt M tdewallet/backend/CMakeLists.txt M tdewallet/backend/tests/backendtest.cpp M tdewallet/backend/tests/testsha.cpp |
||
** Diff limit reached (max: 250 lines) ** |
||
5c6425de | 2017-01-28 19:31:05 | Slávek Banko |
testing: fix build of tdewallet tests with hidden visibility Signed-off-by: Slávek Banko <slavek.banko@...> |
||
M tdewallet/backend/tests/CMakeLists.txt |
||
** Diff limit reached (max: 250 lines) ** |
||
30d5bd4d | 2017-01-28 19:32:26 | Slávek Banko |
testing: fix bash specific syntax in dcop test Signed-off-by: Slávek Banko <slavek.banko@...> |
||
M dcop/tests/run-tests.sh |
||
** Diff limit reached (max: 250 lines) ** |
||
4d3d8d86 | 2017-01-28 19:35:44 | Slávek Banko |
testing: run tdeio/kmimetypetest with temporary profile Signed-off-by: Slávek Banko <slavek.banko@...> |
||
A tdeio/tests/kmimetypetest.sh.cmake M tdeio/tests/CMakeLists.txt |
||
** Diff limit reached (max: 250 lines) ** |
||
24b4a815 | 2017-01-28 19:42:10 | Slávek Banko |
testing: disable tdeabc/testldapclient Test requires running TDE session and access to a foreign ldap server on the Internet. Signed-off-by: Slávek Banko <slavek.banko@...> |
||
M tdeabc/tests/CMakeLists.txt |
||
** Diff limit reached (max: 250 lines) ** |
||
e305bd81 | 2017-01-28 19:45:55 | Slávek Banko |
testing: fix utf8 handling in tdeabc/testread2 Signed-off-by: Slávek Banko <slavek.banko@...> |
||
M tdeabc/vcardparser/testutils.cpp |
||
** Diff limit reached (max: 250 lines) ** |