diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-11-26 03:22:20 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-11-26 03:22:20 +0100 |
commit | 9eb456336dc8bae2000f7d729d2d63c4a0906157 (patch) | |
tree | 74e46844f006eb80ab294b25ac29b94b28e07ea5 | |
parent | 3f6aecf5a2cca0330af3f55ddbb3d7e13e2419c0 (diff) | |
download | MultiMC-9eb456336dc8bae2000f7d729d2d63c4a0906157.tar MultiMC-9eb456336dc8bae2000f7d729d2d63c4a0906157.tar.gz MultiMC-9eb456336dc8bae2000f7d729d2d63c4a0906157.tar.lz MultiMC-9eb456336dc8bae2000f7d729d2d63c4a0906157.tar.xz MultiMC-9eb456336dc8bae2000f7d729d2d63c4a0906157.zip |
NOISSUE fix unit tests
-rw-r--r-- | api/logic/minecraft/Library_test.cpp | 4 | ||||
-rw-r--r-- | api/logic/updater/UpdateChecker_test.cpp | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/api/logic/minecraft/Library_test.cpp b/api/logic/minecraft/Library_test.cpp index fe22c804..c3d6150d 100644 --- a/api/logic/minecraft/Library_test.cpp +++ b/api/logic/minecraft/Library_test.cpp @@ -65,7 +65,7 @@ slots: test.setHint("local"); auto downloads = test.getDownloads(currentSystem, cache.get(), failedFiles, QString()); QCOMPARE(downloads.size(), 0); - QCOMPARE(failedFiles, getStorage("test/package/testname/testversion/testname-testversion.jar")); + QCOMPARE(failedFiles, {"testname-testversion.jar"}); } void test_legacy_url_local_override() { @@ -174,7 +174,7 @@ slots: QStringList failedFiles; auto dls = test.getDownloads(Os_Linux, cache.get(), failedFiles, QString("data")); QCOMPARE(dls.size(), 0); - QCOMPARE(failedFiles, {getStorage("test/package/testname/testversion/testname-testversion-linux-64.jar")}); + QCOMPARE(failedFiles, {"data/testname-testversion-linux-64.jar"}); } } void test_onenine() diff --git a/api/logic/updater/UpdateChecker_test.cpp b/api/logic/updater/UpdateChecker_test.cpp index 59f2a5a1..5702d9c6 100644 --- a/api/logic/updater/UpdateChecker_test.cpp +++ b/api/logic/updater/UpdateChecker_test.cpp @@ -21,6 +21,11 @@ QDebug operator<<(QDebug dbg, const UpdateChecker::ChannelListEntry &c) return dbg.maybeSpace(); } +QString findTestDataUrl(const char *file) +{ + return QUrl::fromLocalFile(QFINDTESTDATA(file)).toString(); +} + class UpdateCheckerTest : public QObject { Q_OBJECT @@ -35,10 +40,6 @@ slots: } - static QString findTestDataUrl(const char *file) - { - return QUrl::fromLocalFile(QFINDTESTDATA(file)).toString(); - } void tst_ChannelListParsing_data() { QTest::addColumn<QString>("channel"); |