summaryrefslogtreecommitdiffstats
path: root/tests/tst_WonkoIndex.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-04-14 01:23:54 +0200
committerPetr Mrázek <peterix@gmail.com>2016-05-01 00:02:15 +0200
commit771dd6f9abe29c1d24c5ea8f0e7ca949bc24f84d (patch)
tree52962ddf547b3227f1b637dd1da2b3d0b5a5a766 /tests/tst_WonkoIndex.cpp
parente8ba5dafc63de65ed8a469353b808e391633f0fc (diff)
downloadMultiMC-771dd6f9abe29c1d24c5ea8f0e7ca949bc24f84d.tar
MultiMC-771dd6f9abe29c1d24c5ea8f0e7ca949bc24f84d.tar.gz
MultiMC-771dd6f9abe29c1d24c5ea8f0e7ca949bc24f84d.tar.lz
MultiMC-771dd6f9abe29c1d24c5ea8f0e7ca949bc24f84d.tar.xz
MultiMC-771dd6f9abe29c1d24c5ea8f0e7ca949bc24f84d.zip
NOISSUE reorganize unit tests to be placed next to the code they test. Nuke more dead tests.
Diffstat (limited to 'tests/tst_WonkoIndex.cpp')
-rw-r--r--tests/tst_WonkoIndex.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/tests/tst_WonkoIndex.cpp b/tests/tst_WonkoIndex.cpp
deleted file mode 100644
index 076c806b..00000000
--- a/tests/tst_WonkoIndex.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-#include <QTest>
-#include "TestUtil.h"
-
-#include "wonko/WonkoIndex.h"
-#include "wonko/WonkoVersionList.h"
-#include "Env.h"
-
-class WonkoIndexTest : public QObject
-{
- Q_OBJECT
-private
-slots:
- void test_isProvidedByEnv()
- {
- QVERIFY(ENV.wonkoIndex() != nullptr);
- QCOMPARE(ENV.wonkoIndex(), ENV.wonkoIndex());
- }
-
- void test_providesTasks()
- {
- QVERIFY(ENV.wonkoIndex()->localUpdateTask() != nullptr);
- QVERIFY(ENV.wonkoIndex()->remoteUpdateTask() != nullptr);
- }
-
- void test_hasUid_and_getList()
- {
- WonkoIndex windex({std::make_shared<WonkoVersionList>("list1"), std::make_shared<WonkoVersionList>("list2"), std::make_shared<WonkoVersionList>("list3")});
- QVERIFY(windex.hasUid("list1"));
- QVERIFY(!windex.hasUid("asdf"));
- QVERIFY(windex.getList("list2") != nullptr);
- QCOMPARE(windex.getList("list2")->uid(), QString("list2"));
- QVERIFY(windex.getList("adsf") == nullptr);
- }
-
- void test_merge()
- {
- WonkoIndex windex({std::make_shared<WonkoVersionList>("list1"), std::make_shared<WonkoVersionList>("list2"), std::make_shared<WonkoVersionList>("list3")});
- QCOMPARE(windex.lists().size(), 3);
- windex.merge(std::shared_ptr<WonkoIndex>(new WonkoIndex({std::make_shared<WonkoVersionList>("list1"), std::make_shared<WonkoVersionList>("list2"), std::make_shared<WonkoVersionList>("list3")})));
- QCOMPARE(windex.lists().size(), 3);
- windex.merge(std::shared_ptr<WonkoIndex>(new WonkoIndex({std::make_shared<WonkoVersionList>("list4"), std::make_shared<WonkoVersionList>("list2"), std::make_shared<WonkoVersionList>("list5")})));
- QCOMPARE(windex.lists().size(), 5);
- windex.merge(std::shared_ptr<WonkoIndex>(new WonkoIndex({std::make_shared<WonkoVersionList>("list6")})));
- QCOMPARE(windex.lists().size(), 6);
- }
-};
-
-QTEST_GUILESS_MAIN(WonkoIndexTest)
-
-#include "tst_WonkoIndex.moc"