File indexing completed on 2024-12-01 04:20:46
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "bergamotenginesettingswidgettest.h" 0008 #include "bergamotenginesettingswidget.h" 0009 #include <QComboBox> 0010 #include <QFormLayout> 0011 #include <QGroupBox> 0012 #include <QTest> 0013 #include <QVBoxLayout> 0014 QTEST_MAIN(BergamotEngineSettingsWidgetTest) 0015 BergamotEngineSettingsWidgetTest::BergamotEngineSettingsWidgetTest(QObject *parent) 0016 : QObject{parent} 0017 { 0018 } 0019 0020 void BergamotEngineSettingsWidgetTest::shouldHaveDefaultValues() 0021 { 0022 BergamotEngineSettingsWidget w; 0023 auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainLayout")); 0024 QVERIFY(mainLayout); 0025 QCOMPARE(mainLayout->contentsMargins(), QMargins{}); 0026 0027 auto resourceBox = w.findChild<QGroupBox *>(QStringLiteral("resourceBox")); 0028 QVERIFY(resourceBox); 0029 QVERIFY(!resourceBox->title().isEmpty()); 0030 0031 auto mNumberThreads = w.findChild<QComboBox *>(QStringLiteral("mNumberThreads")); 0032 QVERIFY(mNumberThreads); 0033 0034 auto mMemoryByThreads = w.findChild<QComboBox *>(QStringLiteral("mMemoryByThreads")); 0035 QVERIFY(mMemoryByThreads); 0036 } 0037 0038 #include "moc_bergamotenginesettingswidgettest.cpp"