File indexing completed on 2024-12-22 04:46:03
0001 /* 0002 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "messagelistviewtest.h" 0008 #include "room/messagelistview.h" 0009 #include <QTest> 0010 QTEST_MAIN(MessageListViewTest) 0011 0012 MessageListViewTest::MessageListViewTest(QObject *parent) 0013 : QObject{parent} 0014 { 0015 } 0016 0017 void MessageListViewTest::shouldHaveDefaultValues() 0018 { 0019 MessageListView w(nullptr, MessageListView::Mode::Editing); 0020 QCOMPARE(w.mode(), MessageListView::Mode::Editing); 0021 QCOMPARE(w.selectionMode(), QAbstractItemView::NoSelection); 0022 QCOMPARE(w.horizontalScrollBarPolicy(), Qt::ScrollBarAlwaysOff); 0023 QCOMPARE(w.verticalScrollMode(), QAbstractItemView::ScrollPerPixel); 0024 QVERIFY(w.wordWrap()); 0025 QCOMPARE(w.focusPolicy(), Qt::NoFocus); 0026 } 0027 0028 #include "moc_messagelistviewtest.cpp"