aboutsummaryrefslogtreecommitdiff
path: root/tests/Index_test.cpp
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-08-05 19:09:10 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-08-05 19:09:10 +0300
commitb2fdd8359405c93d0d93aa8c68971c986a1f68cb (patch)
tree59859119373213ce04b2f5e2d7a95227b57be609 /tests/Index_test.cpp
parent149b6d59cf848a3b3cd50b3aee1c112e9c47e633 (diff)
parentae793f6cf11658c9abc5111e82d5ba7b3e6af127 (diff)
downloadPrismLauncher-b2fdd8359405c93d0d93aa8c68971c986a1f68cb.tar.gz
PrismLauncher-b2fdd8359405c93d0d93aa8c68971c986a1f68cb.tar.bz2
PrismLauncher-b2fdd8359405c93d0d93aa8c68971c986a1f68cb.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into download_threads
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'tests/Index_test.cpp')
-rw-r--r--tests/Index_test.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/Index_test.cpp b/tests/Index_test.cpp
index 436b753e..888021e2 100644
--- a/tests/Index_test.cpp
+++ b/tests/Index_test.cpp
@@ -3,14 +3,13 @@
#include <meta/Index.h>
#include <meta/VersionList.h>
-class IndexTest : public QObject
-{
+class IndexTest : public QObject {
Q_OBJECT
-private
-slots:
+ private slots:
void test_hasUid_and_getList()
{
- Meta::Index windex({std::make_shared<Meta::VersionList>("list1"), std::make_shared<Meta::VersionList>("list2"), std::make_shared<Meta::VersionList>("list3")});
+ Meta::Index windex({ std::make_shared<Meta::VersionList>("list1"), std::make_shared<Meta::VersionList>("list2"),
+ std::make_shared<Meta::VersionList>("list3") });
QVERIFY(windex.hasUid("list1"));
QVERIFY(!windex.hasUid("asdf"));
QVERIFY(windex.get("list2") != nullptr);
@@ -20,13 +19,18 @@ slots:
void test_merge()
{
- Meta::Index windex({std::make_shared<Meta::VersionList>("list1"), std::make_shared<Meta::VersionList>("list2"), std::make_shared<Meta::VersionList>("list3")});
+ Meta::Index windex({ std::make_shared<Meta::VersionList>("list1"), std::make_shared<Meta::VersionList>("list2"),
+ std::make_shared<Meta::VersionList>("list3") });
QCOMPARE(windex.lists().size(), 3);
- windex.merge(std::shared_ptr<Meta::Index>(new Meta::Index({std::make_shared<Meta::VersionList>("list1"), std::make_shared<Meta::VersionList>("list2"), std::make_shared<Meta::VersionList>("list3")})));
+ windex.merge(std::shared_ptr<Meta::Index>(
+ new Meta::Index({ std::make_shared<Meta::VersionList>("list1"), std::make_shared<Meta::VersionList>("list2"),
+ std::make_shared<Meta::VersionList>("list3") })));
QCOMPARE(windex.lists().size(), 3);
- windex.merge(std::shared_ptr<Meta::Index>(new Meta::Index({std::make_shared<Meta::VersionList>("list4"), std::make_shared<Meta::VersionList>("list2"), std::make_shared<Meta::VersionList>("list5")})));
+ windex.merge(std::shared_ptr<Meta::Index>(
+ new Meta::Index({ std::make_shared<Meta::VersionList>("list4"), std::make_shared<Meta::VersionList>("list2"),
+ std::make_shared<Meta::VersionList>("list5") })));
QCOMPARE(windex.lists().size(), 5);
- windex.merge(std::shared_ptr<Meta::Index>(new Meta::Index({std::make_shared<Meta::VersionList>("list6")})));
+ windex.merge(std::shared_ptr<Meta::Index>(new Meta::Index({ std::make_shared<Meta::VersionList>("list6") })));
QCOMPARE(windex.lists().size(), 6);
}
};