Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouib <code@louib.net>2021-03-13 22:07:49 +0300
committerJonathan White <support@dmapps.us>2021-11-12 15:41:30 +0300
commit004f2b6801d93116277778611920793b7dbe0afb (patch)
treeab328622af017c0e5735ffd0588480321bbed07d /tests/TestKeePass1Reader.cpp
parent6f5bbf7ad1048abc3db7e378df654a61954f77e3 (diff)
Removing QWidget dependency from src/core.
Diffstat (limited to 'tests/TestKeePass1Reader.cpp')
-rw-r--r--tests/TestKeePass1Reader.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/tests/TestKeePass1Reader.cpp b/tests/TestKeePass1Reader.cpp
index 9983cf74c..d7a04bdbb 100644
--- a/tests/TestKeePass1Reader.cpp
+++ b/tests/TestKeePass1Reader.cpp
@@ -114,20 +114,12 @@ void TestKeePass1Reader::testMasterKey()
void TestKeePass1Reader::testCustomIcons()
{
QCOMPARE(m_db->metadata()->customIconsOrder().size(), 1);
+ QUuid uuid = m_db->metadata()->customIconsOrder().at(0);
+ QVERIFY(m_db->metadata()->hasCustomIcon(uuid));
+ QByteArray icon = m_db->metadata()->customIcon(uuid);
- Entry* entry = m_db->rootGroup()->children().at(1)->entries().at(0);
-
- QCOMPARE(entry->icon().width(), 16);
- QCOMPARE(entry->icon().height(), 16);
-
- for (int x = 0; x < 16; x++) {
- for (int y = 0; y < 16; y++) {
- QRgb rgb = entry->icon().pixel(x, y);
- QCOMPARE(qRed(rgb), 8);
- QCOMPARE(qGreen(rgb), 160);
- QCOMPARE(qBlue(rgb), 60);
- }
- }
+ QVERIFY(icon.startsWith(
+ "\x89PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\b\x06\x00\x00\x00\x1F\xF3\xFF"));
}
void TestKeePass1Reader::testGroupExpanded()