From 771dd6f9abe29c1d24c5ea8f0e7ca949bc24f84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 14 Apr 2016 01:23:54 +0200 Subject: NOISSUE reorganize unit tests to be placed next to the code they test. Nuke more dead tests. --- tests/tst_userutils.cpp | 70 ------------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 tests/tst_userutils.cpp (limited to 'tests/tst_userutils.cpp') diff --git a/tests/tst_userutils.cpp b/tests/tst_userutils.cpp deleted file mode 100644 index 01f1b2a6..00000000 --- a/tests/tst_userutils.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include "TestUtil.h" -#include - -class UserUtilsTest : public QObject -{ - Q_OBJECT -private -slots: - void initTestCase() - { - - } - void cleanupTestCase() - { - - } - - void test_getDesktop() - { - QCOMPARE(FS::getDesktopDir(), QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)); - } - -// this is only valid on linux -// FIXME: implement on windows, OSX, then test. -#if defined(Q_OS_LINUX) - void test_createShortcut_data() - { - QTest::addColumn("location"); - QTest::addColumn("dest"); - QTest::addColumn("args"); - QTest::addColumn("name"); - QTest::addColumn("iconLocation"); - QTest::addColumn("result"); - - QTest::newRow("unix") << QDir::currentPath() - << "asdfDest" - << (QStringList() << "arg1" << "arg2") - << "asdf" - << QString() - #if defined(Q_OS_LINUX) - << MULTIMC_GET_TEST_FILE("data/tst_userutils-test_createShortcut-unix") - #elif defined(Q_OS_WIN) - << QByteArray() - #endif - ; - } - - void test_createShortcut() - { - QFETCH(QString, location); - QFETCH(QString, dest); - QFETCH(QStringList, args); - QFETCH(QString, name); - QFETCH(QString, iconLocation); - QFETCH(QByteArray, result); - - QVERIFY(FS::createShortCut(location, dest, args, name, iconLocation)); - QCOMPARE(QString::fromLocal8Bit(TestsInternal::readFile(location + QDir::separator() + name + ".desktop")), QString::fromLocal8Bit(result)); - - //QDir().remove(location); - } -#endif -}; - - -QTEST_GUILESS_MAIN(UserUtilsTest) - -#include "tst_userutils.moc" -- cgit v1.2.3