Commit 85991417 authored by Richard Lärkäng's avatar Richard Lärkäng
Browse files

Use QTEST_* macros instead of own main methods

svn path=/trunk/KDE/kdemultimedia/libkcddb/; revision=500912
parent 8e4ad45f
...@@ -17,11 +17,8 @@ ...@@ -17,11 +17,8 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <QtTest/qtest.h> #include <QtTest/QtTest>
#include <kaboutdata.h> #include <QtCore/QCoreApplication>
#include <kcmdlineargs.h>
#include <kapplication.h>
#include <kdebug.h>
#include "libkcddb/cdinfo.h" #include "libkcddb/cdinfo.h"
#include "cdinfotest.h" #include "cdinfotest.h"
...@@ -75,15 +72,6 @@ void CDInfoTest::testLongLines() ...@@ -75,15 +72,6 @@ void CDInfoTest::testLongLines()
} }
} }
int main(int argc, char *argv[]) QTEST_MAIN(CDInfoTest);
{
setenv("LC_ALL", "C", 1);
KAboutData aboutData( "qttest", "qttest", "version" );
KCmdLineArgs::init( argc, argv, &aboutData );
KApplication::disableAutoDcopRegistration();
KApplication app(false);
CDInfoTest tc;
return QTest::qExec( &tc, argc, argv );
}
#include "cdinfotest.moc" #include "cdinfotest.moc"
...@@ -17,10 +17,7 @@ ...@@ -17,10 +17,7 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <QtTest/qtest.h> #include <qtest_kde.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kapplication.h>
#include "libkcddb/client.h" #include "libkcddb/client.h"
#include "libkcddb/cache.h" #include "libkcddb/cache.h"
#include "libkcddb/lookup.h" #include "libkcddb/lookup.h"
...@@ -90,15 +87,6 @@ void SyncCDDBLookupTest::testLookup() ...@@ -90,15 +87,6 @@ void SyncCDDBLookupTest::testLookup()
QVERIFY(hasRunTest); QVERIFY(hasRunTest);
} }
int main(int argc, char *argv[]) QTEST_KDEMAIN(SyncCDDBLookupTest, NoGUI);
{
setenv("LC_ALL", "C", 1);
KAboutData aboutData( "qttest", "qttest", "version" );
KCmdLineArgs::init( argc, argv, &aboutData );
KApplication::disableAutoDcopRegistration();
KApplication app(false);
SyncCDDBLookupTest tc;
return QTest::qExec( &tc, argc, argv );
}
#include "synccddblookuptest.moc" #include "synccddblookuptest.moc"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment