diff options
author | louib <code@louib.net> | 2021-03-13 22:07:49 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2021-11-12 15:41:30 +0300 |
commit | 004f2b6801d93116277778611920793b7dbe0afb (patch) | |
tree | ab328622af017c0e5735ffd0588480321bbed07d /tests/TestKeePass2Format.cpp | |
parent | 6f5bbf7ad1048abc3db7e378df654a61954f77e3 (diff) |
Removing QWidget dependency from src/core.
Diffstat (limited to 'tests/TestKeePass2Format.cpp')
-rw-r--r-- | tests/TestKeePass2Format.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/TestKeePass2Format.cpp b/tests/TestKeePass2Format.cpp index bbe9f3c3e..397c8bd1c 100644 --- a/tests/TestKeePass2Format.cpp +++ b/tests/TestKeePass2Format.cpp @@ -113,18 +113,10 @@ void TestKeePass2Format::testXmlCustomIcons() QCOMPARE(m_xmlDb->metadata()->customIconsOrder().size(), 1); QUuid uuid = QUuid::fromRfc4122(QByteArray::fromBase64("++vyI+daLk6omox4a6kQGA==")); QVERIFY(m_xmlDb->metadata()->hasCustomIcon(uuid)); - QImage icon = m_xmlDb->metadata()->customIcon(uuid); - QCOMPARE(icon.width(), 16); - QCOMPARE(icon.height(), 16); - - for (int x = 0; x < 16; x++) { - for (int y = 0; y < 16; y++) { - QRgb rgb = icon.pixel(x, y); - QCOMPARE(qRed(rgb), 128); - QCOMPARE(qGreen(rgb), 0); - QCOMPARE(qBlue(rgb), 128); - } - } + QByteArray icon = m_xmlDb->metadata()->customIcon(uuid); + + 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 TestKeePass2Format::testXmlGroupRoot() |