File indexing completed on 2024-10-27 04:50:59
0001 /* 0002 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "externaleditorwarningtest.h" 0008 #include "../externaleditorwarning.h" 0009 #include <QHBoxLayout> 0010 #include <QTest> 0011 0012 QTEST_MAIN(ExternalEditorWarningTest) 0013 0014 ExternalEditorWarningTest::ExternalEditorWarningTest(QObject *parent) 0015 : QObject(parent) 0016 { 0017 } 0018 0019 void ExternalEditorWarningTest::shouldHaveDefaultValue() 0020 { 0021 QWidget wid; 0022 auto layout = new QHBoxLayout(&wid); 0023 ExternalEditorWarning w; 0024 layout->addWidget(&w); 0025 wid.show(); 0026 QVERIFY(!w.isVisible()); 0027 // QVERIFY(w.isCloseButtonVisible()); 0028 QCOMPARE(w.messageType(), KMessageWidget::Information); 0029 QVERIFY(w.wordWrap()); 0030 QVERIFY(!w.text().isEmpty()); 0031 } 0032 0033 #include "moc_externaleditorwarningtest.cpp"