File indexing completed on 2024-12-08 06:39:03
0001 // SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0002 // SPDX-FileCopyrightText: 2023 Harald Sitter <sitter@kde.org> 0003 0004 #include <QTest> 0005 0006 #include <kcountryflagemojiiconengine.h> 0007 0008 using namespace Qt::Literals::StringLiterals; 0009 0010 class KCountryFlagEmojiIconEngineTest : public QObject 0011 { 0012 Q_OBJECT 0013 private Q_SLOTS: 0014 void testIsNull() 0015 { 0016 QVERIFY(KCountryFlagEmojiIconEngine(QString()).isNull()); 0017 } 0018 0019 void testAustria() 0020 { 0021 QIcon icon(new KCountryFlagEmojiIconEngine("AT"_L1)); 0022 auto pixmap = icon.pixmap(16, 16); 0023 QVERIFY(!pixmap.isNull()); 0024 } 0025 0026 void testScotland() 0027 { 0028 QIcon icon(new KCountryFlagEmojiIconEngine("GB-SCT"_L1)); 0029 auto pixmap = icon.pixmap(16, 16); 0030 QVERIFY(!pixmap.isNull()); 0031 } 0032 }; 0033 0034 QTEST_MAIN(KCountryFlagEmojiIconEngineTest) 0035 0036 #include "kcountryflagemojiiconenginetest.moc"