File indexing completed on 2025-01-05 05:18:57
0001 // SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0002 // 0003 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 0005 #include "kllmresultwidgettest.h" 0006 #include "KLLMResultWidget.h" 0007 #include <QPlainTextEdit> 0008 #include <QTest> 0009 #include <QVBoxLayout> 0010 QTEST_MAIN(KLLMResultWidgetTest) 0011 KLLMResultWidgetTest::KLLMResultWidgetTest(QObject *parent) 0012 : QObject{parent} 0013 { 0014 } 0015 0016 void KLLMResultWidgetTest::shouldHaveDefaultValues() 0017 { 0018 KLLMWidgets::KLLMResultWidget w; 0019 auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainLayout")); 0020 QVERIFY(mainLayout); 0021 QCOMPARE(mainLayout->contentsMargins(), QMargins{}); 0022 0023 auto mResult = w.findChild<QPlainTextEdit *>(QStringLiteral("mResult")); 0024 QVERIFY(mResult); 0025 QVERIFY(mResult->isReadOnly()); 0026 } 0027 0028 #include "moc_kllmresultwidgettest.cpp"