Deleted:
/trunk/tests/libs/ContentFetcher/main.cpp
/trunk/tests/libs/MediaInfoFetcher/main.cpp
/trunk/tests/quarkplayer-plugins/FindSubtitles/main.cpp
Modified:
/trunk/tests/libs/ContentFetcher/AmazonCoverArtTest.cpp
/trunk/tests/libs/ContentFetcher/CMakeLists.txt
/trunk/tests/libs/ContentFetcher/LyricsFetcherTest.cpp
/trunk/tests/libs/ContentFetcher/WikipediaArticleTest.cpp
/trunk/tests/libs/MediaInfoFetcher/CMakeLists.txt
/trunk/tests/libs/MediaInfoFetcher/MediaInfoTest.cpp
/trunk/tests/libs/TkUtil/FindFilesTest.cpp
/trunk/tests/libs/TkUtil/SearchLineEditTest.cpp
/trunk/tests/libs/WebBrowser/CMakeLists.txt
/trunk/tests/libs/WebBrowser/WebBrowserTest.cpp
/trunk/tests/quarkplayer-plugins/FindSubtitles/CMakeLists.txt
/trunk/tests/quarkplayer-plugins/FindSubtitles/FindSubtitlesTest.cpp
/trunk/tests/quarkplayer-plugins/FindSubtitles/ZipFileTest.cpp
=======================================
--- /trunk/tests/libs/ContentFetcher/main.cpp Fri Aug 13 02:18:04 2010
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * QuarkPlayer, a Phonon media player
- * Copyright (C) 2008-2009 Tanguy Krotoff <tkro...@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "LyricsFetcherTest.h"
-#include "WikipediaArticleTest.h"
-#include "AmazonCoverArtTest.h"
-
-int main(int argc, char * argv[]) {
- QCoreApplication app(argc, argv);
-
- int result = EXIT_FAILURE;
-
- LyricsFetcherTest test1;
- result |= QTest::qExec(&test1, argc, argv);
-
- WikipediaArticleTest test2;
- result |= QTest::qExec(&test2, argc, argv);
-
- AmazonCoverArtTest test3;
- result |= QTest::qExec(&test3, argc, argv);
-
- return result;
-}
=======================================
--- /trunk/tests/libs/MediaInfoFetcher/main.cpp Fri Aug 13 02:18:04 2010
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * QuarkPlayer, a Phonon media player
- * Copyright (C) 2008-2010 Tanguy Krotoff <tkro...@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "MediaInfoTest.h"
-
-int main(int argc, char * argv[]) {
- QCoreApplication app(argc, argv);
-
- int result = EXIT_FAILURE;
-
- MediaInfoTest test1;
- result |= QTest::qExec(&test1, argc, argv);
-
- return result;
-}
=======================================
--- /trunk/tests/quarkplayer-plugins/FindSubtitles/main.cpp Fri Aug 13
02:18:04 2010
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * QuarkPlayer, a Phonon media player
- * Copyright (C) 2008-2010 Tanguy Krotoff <tkro...@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "ZipFileTest.h"
-#include "FindSubtitlesTest.h"
-
-int main(int argc, char * argv[]) {
- QApplication app(argc, argv);
-
- int result = EXIT_FAILURE;
-
- ZipFileTest test1;
- result |= QTest::qExec(&test1, argc, argv);
-
- FindSubtitlesTest test2;
- result |= QTest::qExec(&test2, argc, argv);
-
- return result;
-}
=======================================
--- /trunk/tests/libs/ContentFetcher/AmazonCoverArtTest.cpp Fri Aug 13
02:18:04 2010
+++ /trunk/tests/libs/ContentFetcher/AmazonCoverArtTest.cpp Tue Feb 22
06:23:18 2011
@@ -1,6 +1,6 @@
/*
* QuarkPlayer, a Phonon media player
- * Copyright (C) 2008-2009 Tanguy Krotoff <tkro...@gmail.com>
+ * Copyright (C) 2008-2011 Tanguy Krotoff <tkro...@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
published by
@@ -22,6 +22,8 @@
#include <QtCore/QRegExp>
+QTEST_MAIN(AmazonCoverArtTest)
+
//Please don't copy this to another program; keys are free from
aws.amazon.com
//Your Access Key ID:
static const char * AMAZON_WEB_SERVICE_ACCESS_KEY_ID
= "1BPZGMNT4PWSJS6NHG02";
=======================================
--- /trunk/tests/libs/ContentFetcher/CMakeLists.txt Wed Nov 25 10:08:49 2009
+++ /trunk/tests/libs/ContentFetcher/CMakeLists.txt Tue Feb 22 06:23:18 2011
@@ -1,26 +1,32 @@
-project(ContentFetcherTest)
-
-set(ContentFetcherTest_SRCS
- LyricsFetcherTest.cpp
- WikipediaArticleTest.cpp
- AmazonCoverArtTest.cpp
- main.cpp
-)
-
-qt4_wrap_cpp(ContentFetcherTest_SRCS
- LyricsFetcherTest.h
- WikipediaArticleTest.h
- AmazonCoverArtTest.h
-)
-
-add_executable(ContentFetcherTest ${ContentFetcherTest_SRCS})
-add_test(ContentFetcherTest ContentFetcherTest)
-
-target_link_libraries(ContentFetcherTest
- ContentFetcher
-
- ${QT_QTCORE_LIBRARY}
- ${QT_QTTEST_LIBRARY}
-)
-
-install(TARGETS ContentFetcherTest ${INSTALL_TARGETS_DEFAULT_ARGS})
+project(ContentFetcherTests)
+
+macro(add_my_test name)
+ set(SRCS ${ARGN})
+
+ add_executable(${name} ${SRCS})
+
+ add_test(${name} ${name})
+
+ target_link_libraries(${name}
+ ContentFetcher
+
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTTEST_LIBRARY}
+ )
+ install(TARGETS ${name} ${INSTALL_TARGETS_DEFAULT_ARGS})
+endmacro(add_my_test name)
+
+
+set(LyricsFetcherTest_SRCS LyricsFetcherTest.cpp)
+qt4_wrap_cpp(LyricsFetcherTest_SRCS LyricsFetcherTest.h)
+add_my_test(LyricsFetcherTest ${LyricsFetcherTest_SRCS})
+
+
+set(WikipediaArticleTest_SRCS WikipediaArticleTest.cpp)
+qt4_wrap_cpp(WikipediaArticleTest_SRCS WikipediaArticleTest.h)
+add_my_test(WikipediaArticleTest ${WikipediaArticleTest_SRCS})
+
+
+set(AmazonCoverArtTest_SRCS AmazonCoverArtTest.cpp)
+qt4_wrap_cpp(AmazonCoverArtTest_SRCS AmazonCoverArtTest.h)
+add_my_test(AmazonCoverArtTest ${AmazonCoverArtTest_SRCS})
=======================================
--- /trunk/tests/libs/ContentFetcher/LyricsFetcherTest.cpp Fri Aug 13
02:18:04 2010
+++ /trunk/tests/libs/ContentFetcher/LyricsFetcherTest.cpp Tue Feb 22
06:23:18 2011
Binary file, no diff available.
=======================================
--- /trunk/tests/libs/ContentFetcher/WikipediaArticleTest.cpp Fri Aug 13
02:18:04 2010
+++ /trunk/tests/libs/ContentFetcher/WikipediaArticleTest.cpp Tue Feb 22
06:23:18 2011
@@ -1,6 +1,6 @@
/*
* QuarkPlayer, a Phonon media player
- * Copyright (C) 2008-2009 Tanguy Krotoff <tkro...@gmail.com>
+ * Copyright (C) 2008-2011 Tanguy Krotoff <tkro...@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
published by
@@ -22,6 +22,8 @@
#include <QtCore/QRegExp>
+QTEST_MAIN(WikipediaArticleTest)
+
void WikipediaArticleTest::initTestCase() {
_wikipediaArticle = new WikipediaArticle(this);
connect(_wikipediaArticle,
=======================================
--- /trunk/tests/libs/MediaInfoFetcher/CMakeLists.txt Mon Nov 30 09:43:23
2009
+++ /trunk/tests/libs/MediaInfoFetcher/CMakeLists.txt Tue Feb 22 06:23:18
2011
@@ -1,22 +1,22 @@
-project(MediaInfoTest)
-
-set(MediaInfoTest_SRCS
- MediaInfoTest.cpp
- main.cpp
-)
-
-qt4_wrap_cpp(MediaInfoTest_SRCS
- MediaInfoTest.h
-)
-
-add_executable(MediaInfoTest ${MediaInfoTest_SRCS})
-add_test(MediaInfoTest MediaInfoTest)
-
-target_link_libraries(MediaInfoTest
- MediaInfoFetcher
-
- ${QT_QTCORE_LIBRARY}
- ${QT_QTTEST_LIBRARY}
-)
-
-install(TARGETS MediaInfoTest ${INSTALL_TARGETS_DEFAULT_ARGS})
+project(MediaInfoTests)
+
+macro(add_unit_test name)
+ set(SRCS ${ARGN})
+
+ add_executable(${name} ${SRCS})
+
+ add_test(${name} ${name})
+
+ target_link_libraries(${name}
+ MediaInfoFetcher
+
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTTEST_LIBRARY}
+ )
+ install(TARGETS ${name} ${INSTALL_TARGETS_DEFAULT_ARGS})
+endmacro(add_unit_test name)
+
+
+set(MediaInfoTest_SRCS MediaInfoTest.cpp)
+qt4_wrap_cpp(MediaInfoTest_SRCS MediaInfoTest.h)
+add_unit_test(MediaInfoTest ${MediaInfoTest_SRCS})
=======================================
--- /trunk/tests/libs/MediaInfoFetcher/MediaInfoTest.cpp Mon Feb 21
09:03:06 2011
+++ /trunk/tests/libs/MediaInfoFetcher/MediaInfoTest.cpp Tue Feb 22
06:23:18 2011
@@ -20,6 +20,8 @@
#include <MediaInfoFetcher/MediaInfo.h>
+QTEST_MAIN(MediaInfoTest)
+
void MediaInfoTest::initTestCase() {
}
=======================================
--- /trunk/tests/libs/TkUtil/FindFilesTest.cpp Sat Aug 28 02:34:02 2010
+++ /trunk/tests/libs/TkUtil/FindFilesTest.cpp Tue Feb 22 06:23:18 2011
@@ -1,6 +1,6 @@
/*
* QuarkPlayer, a Phonon media player
- * Copyright (C) 2008-2010 Tanguy Krotoff <tkro...@gmail.com>
+ * Copyright (C) 2008-2011 Tanguy Krotoff <tkro...@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
published by
=======================================
--- /trunk/tests/libs/TkUtil/SearchLineEditTest.cpp Sat Aug 28 02:34:02 2010
+++ /trunk/tests/libs/TkUtil/SearchLineEditTest.cpp Tue Feb 22 06:23:18 2011
@@ -1,6 +1,6 @@
/*
* QuarkPlayer, a Phonon media player
- * Copyright (C) 2008-2010 Tanguy Krotoff <tkro...@gmail.com>
+ * Copyright (C) 2008-2011 Tanguy Krotoff <tkro...@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
published by
=======================================
--- /trunk/tests/libs/WebBrowser/CMakeLists.txt Wed Nov 25 10:08:49 2009
+++ /trunk/tests/libs/WebBrowser/CMakeLists.txt Tue Feb 22 06:23:18 2011
@@ -1,21 +1,23 @@
-project(WebBrowserTest)
-
-set(WebBrowserTest_SRCS
- WebBrowserTest.cpp
-)
-
-qt4_wrap_cpp(WebBrowserTest_SRCS
- WebBrowserTest.h
-)
-
-add_executable(WebBrowserTest ${WebBrowserTest_SRCS})
-
-target_link_libraries(WebBrowserTest
- WebBrowser
- ContentFetcher
-
- ${QT_QTCORE_LIBRARY}
- ${QT_QTGUI_LIBRARY}
-)
-
-install(TARGETS WebBrowserTest ${INSTALL_TARGETS_DEFAULT_ARGS})
+project(WebBrowserTests)
+
+macro(add_my_test name)
+ set(SRCS ${ARGN})
+
+ add_executable(${name} ${SRCS})
+
+ add_test(${name} ${name})
+
+ target_link_libraries(${name}
+ WebBrowser
+ ContentFetcher
+
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTGUI_LIBRARY}
+ )
+ install(TARGETS ${name} ${INSTALL_TARGETS_DEFAULT_ARGS})
+endmacro(add_my_test name)
+
+
+set(WebBrowserTest_SRCS WebBrowserTest.cpp)
+qt4_wrap_cpp(WebBrowserTest_SRCS WebBrowserTest.h)
+add_my_test(WebBrowserTest ${WebBrowserTest_SRCS})
=======================================
--- /trunk/tests/libs/WebBrowser/WebBrowserTest.cpp Fri Aug 13 02:18:04 2010
+++ /trunk/tests/libs/WebBrowser/WebBrowserTest.cpp Tue Feb 22 06:23:18 2011
@@ -1,6 +1,6 @@
/*
* QuarkPlayer, a Phonon media player
- * Copyright (C) 2008-2010 Tanguy Krotoff <tkro...@gmail.com>
+ * Copyright (C) 2008-2011 Tanguy Krotoff <tkro...@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
published by
=======================================
--- /trunk/tests/quarkplayer-plugins/FindSubtitles/CMakeLists.txt Thu Nov
26 04:07:35 2009
+++ /trunk/tests/quarkplayer-plugins/FindSubtitles/CMakeLists.txt Tue Feb
22 06:23:18 2011
@@ -1,28 +1,29 @@
-project(FindSubtitlesTest)
-
-set(FindSubtitlesTest_SRCS
- FindSubtitlesTest.cpp
- ZipFileTest.cpp
- main.cpp
-)
-
-qt4_wrap_cpp(FindSubtitlesTest_SRCS
- FindSubtitlesTest.h
- ZipFileTest.h
-)
-
-qt4_add_resources(FindSubtitlesTest_SRCS
- zipfiles.qrc
-)
-
-add_executable(FindSubtitlesTest ${FindSubtitlesTest_SRCS})
-
-target_link_libraries(FindSubtitlesTest
- FindSubtitles
-
- ${QT_QTCORE_LIBRARY}
- ${QT_QTGUI_LIBRARY}
- ${QT_QTTEST_LIBRARY}
-)
-
-install(TARGETS FindSubtitlesTest ${INSTALL_TARGETS_DEFAULT_ARGS})
+project(FindSubtitlesTests)
+
+macro(add_my_test name)
+ set(SRCS ${ARGN})
+
+ add_executable(${name} ${SRCS})
+
+ add_test(${name} ${name})
+
+ target_link_libraries(${name}
+ FindSubtitles
+
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTGUI_LIBRARY}
+ ${QT_QTTEST_LIBRARY}
+ )
+ install(TARGETS ${name} ${INSTALL_TARGETS_DEFAULT_ARGS})
+endmacro(add_my_test name)
+
+
+set(FindSubtitlesTest_SRCS FindSubtitlesTest.cpp)
+qt4_wrap_cpp(FindSubtitlesTest_SRCS FindSubtitlesTest.h)
+add_my_test(FindSubtitlesTest ${FindSubtitlesTest_SRCS})
+
+
+set(ZipFileTest_SRCS ZipFileTest.cpp)
+qt4_wrap_cpp(ZipFileTest_SRCS ZipFileTest.h)
+qt4_add_resources(ZipFileTest_SRCS zipfiles.qrc)
+add_my_test(ZipFileTest ${ZipFileTest_SRCS})
=======================================
--- /trunk/tests/quarkplayer-plugins/FindSubtitles/FindSubtitlesTest.cpp
Fri Aug 20 19:52:45 2010
+++ /trunk/tests/quarkplayer-plugins/FindSubtitles/FindSubtitlesTest.cpp
Tue Feb 22 06:23:18 2011
@@ -1,6 +1,6 @@
/*
* QuarkPlayer, a Phonon media player
- * Copyright (C) 2008-2010 Tanguy Krotoff <tkro...@gmail.com>
+ * Copyright (C) 2008-2011 Tanguy Krotoff <tkro...@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
published by
@@ -21,6 +21,8 @@
#include <quarkplayer-plugins/FindSubtitles/FindSubtitlesWindow.h>
#include <quarkplayer-plugins/FindSubtitles/FindSubtitlesLogger.h>
+QTEST_MAIN(FindSubtitlesTest)
+
void FindSubtitlesTest::initTestCase() {
}
=======================================
--- /trunk/tests/quarkplayer-plugins/FindSubtitles/ZipFileTest.cpp Fri Aug
20 19:52:45 2010
+++ /trunk/tests/quarkplayer-plugins/FindSubtitles/ZipFileTest.cpp Tue Feb
22 06:23:18 2011
@@ -1,6 +1,6 @@
/*
* QuarkPlayer, a Phonon media player
- * Copyright (C) 2008-2009 Tanguy Krotoff <tkro...@gmail.com>
+ * Copyright (C) 2008-2011 Tanguy Krotoff <tkro...@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
published by
@@ -21,6 +21,8 @@
#include <quarkplayer-plugins/FindSubtitles/ZipFile.h>
#include <quarkplayer-plugins/FindSubtitles/FindSubtitlesLogger.h>
+QTEST_MAIN(ZipFileTest)
+
void ZipFileTest::initTestCase() {
}