From f93f867c3da084c6d6c5e3ed23896609cff0e692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 5 Oct 2015 01:47:27 +0200 Subject: NOISSUE dissolve util library --- tests/tst_DownloadTask.cpp | 4 ++-- tests/tst_modutils.cpp | 8 ++++---- tests/tst_pathutils.cpp | 7 +++---- tests/tst_userutils.cpp | 7 +++---- 4 files changed, 12 insertions(+), 14 deletions(-) (limited to 'tests') diff --git a/tests/tst_DownloadTask.cpp b/tests/tst_DownloadTask.cpp index 3ff98228..978449f1 100644 --- a/tests/tst_DownloadTask.cpp +++ b/tests/tst_DownloadTask.cpp @@ -6,7 +6,7 @@ #include "updater/GoUpdate.h" #include "updater/DownloadTask.h" #include "updater/UpdateChecker.h" -#include "pathutils.h" +#include using namespace GoUpdate; @@ -166,7 +166,7 @@ slots: << (OperationList() << Operation::DeleteOp("tests/data/fileThree") << Operation::CopyOp( - PathCombine(tempFolder, + FS::PathCombine(tempFolder, QString("tests/data/fileOne").replace("/", "_")), "tests/data/fileOne", 493)); } diff --git a/tests/tst_modutils.cpp b/tests/tst_modutils.cpp index 4d9fe35f..1894711e 100644 --- a/tests/tst_modutils.cpp +++ b/tests/tst_modutils.cpp @@ -15,8 +15,8 @@ #include -#include "modutils.h" #include "TestUtil.h" +#include class ModUtilsTest : public QObject { @@ -95,7 +95,7 @@ private slots: QFETCH(QString, interval); QFETCH(bool, result); - QCOMPARE(Util::versionIsInInterval(version, interval), result); + QCOMPARE(versionIsInInterval(version, interval), result); } void test_versionCompare_data() @@ -109,8 +109,8 @@ private slots: QFETCH(bool, lessThan); QFETCH(bool, equal); - const auto v1 = Util::Version(first); - const auto v2 = Util::Version(second); + const auto v1 = Version(first); + const auto v2 = Version(second); QCOMPARE(v1 < v2, lessThan); QCOMPARE(v1 > v2, !lessThan && !equal); diff --git a/tests/tst_pathutils.cpp b/tests/tst_pathutils.cpp index bccc6dca..de5234b8 100644 --- a/tests/tst_pathutils.cpp +++ b/tests/tst_pathutils.cpp @@ -1,7 +1,6 @@ #include #include "TestUtil.h" - -#include "pathutils.h" +#include class PathUtilsTest : public QObject { @@ -37,7 +36,7 @@ slots: QFETCH(QString, path1); QFETCH(QString, path2); - QCOMPARE(PathCombine(path1, path2), result); + QCOMPARE(FS::PathCombine(path1, path2), result); } void test_PathCombine2_data() @@ -65,7 +64,7 @@ slots: QFETCH(QString, path2); QFETCH(QString, path3); - QCOMPARE(PathCombine(path1, path2, path3), result); + QCOMPARE(FS::PathCombine(path1, path2, path3), result); } }; diff --git a/tests/tst_userutils.cpp b/tests/tst_userutils.cpp index bc7644f3..01f1b2a6 100644 --- a/tests/tst_userutils.cpp +++ b/tests/tst_userutils.cpp @@ -1,8 +1,7 @@ #include #include #include "TestUtil.h" - -#include "userutils.h" +#include class UserUtilsTest : public QObject { @@ -20,7 +19,7 @@ slots: void test_getDesktop() { - QCOMPARE(Util::getDesktopDir(), QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)); + QCOMPARE(FS::getDesktopDir(), QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)); } // this is only valid on linux @@ -57,7 +56,7 @@ slots: QFETCH(QString, iconLocation); QFETCH(QByteArray, result); - QVERIFY(Util::createShortCut(location, dest, args, name, iconLocation)); + QVERIFY(FS::createShortCut(location, dest, args, name, iconLocation)); QCOMPARE(QString::fromLocal8Bit(TestsInternal::readFile(location + QDir::separator() + name + ".desktop")), QString::fromLocal8Bit(result)); //QDir().remove(location); -- cgit v1.2.3