From 004f2b6801d93116277778611920793b7dbe0afb Mon Sep 17 00:00:00 2001 From: louib Date: Sat, 13 Mar 2021 14:07:49 -0500 Subject: Removing QWidget dependency from src/core. --- tests/TestKeePass2Format.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'tests/TestKeePass2Format.cpp') 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() -- cgit v1.2.3