File indexing completed on 2024-06-23 04:40:22
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #include "emoticoncategorybuttonstest.h" 0007 #include "emoticoncategorybuttons.h" 0008 #include <QButtonGroup> 0009 #include <QHBoxLayout> 0010 #include <QTest> 0011 QTEST_MAIN(EmoticonCategoryButtonsTest) 0012 EmoticonCategoryButtonsTest::EmoticonCategoryButtonsTest(QObject *parent) 0013 : QObject{parent} 0014 { 0015 } 0016 0017 void EmoticonCategoryButtonsTest::shouldHaveDefaultValues() 0018 { 0019 TextEmoticonsWidgets::EmoticonCategoryButtons w; 0020 0021 auto mMainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("mMainLayout")); 0022 QVERIFY(mMainLayout); 0023 QCOMPARE(mMainLayout->contentsMargins(), QMargins{}); 0024 0025 auto mButtonGroup = w.findChild<QButtonGroup *>(QStringLiteral("mButtonGroup")); 0026 QVERIFY(mButtonGroup); 0027 QVERIFY(mButtonGroup->buttons().isEmpty()); 0028 } 0029 0030 #include "moc_emoticoncategorybuttonstest.cpp"