File indexing completed on 2024-12-22 04:28:24

0001 /*
0002   SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003 
0004   SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 #include "speechtotexttoolbuttonwidgettest.h"
0007 #include "speechtotext/widgets/speechtotexttoolbuttonwidget.h"
0008 #include <QHBoxLayout>
0009 #include <QTest>
0010 #include <QToolButton>
0011 QTEST_MAIN(SpeechToTextToolButtonWidgetTest)
0012 SpeechToTextToolButtonWidgetTest::SpeechToTextToolButtonWidgetTest(QObject *parent)
0013     : QObject{parent}
0014 {
0015 }
0016 
0017 void SpeechToTextToolButtonWidgetTest::shouldHaveDefaultValues()
0018 {
0019     TextSpeechToText::SpeechToTextToolButtonWidget w;
0020 
0021     auto mToolButton = w.findChild<QToolButton *>(QStringLiteral("mToolButton"));
0022     QVERIFY(mToolButton);
0023 
0024     auto mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("mainLayout"));
0025     QVERIFY(mainLayout);
0026     QCOMPARE(mainLayout->contentsMargins(), QMargins{});
0027 }
0028 
0029 #include "moc_speechtotexttoolbuttonwidgettest.cpp"