File indexing completed on 2026-04-12 05:02:57

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 "switchchanneltreeviewtest.h"
0008 #include "switchchannelhistory/switchchanneltreeview.h"
0009 #include <QTest>
0010 QTEST_MAIN(SwitchChannelTreeViewTest)
0011 SwitchChannelTreeViewTest::SwitchChannelTreeViewTest(QObject *parent)
0012     : QObject{parent}
0013 {
0014 }
0015 
0016 void SwitchChannelTreeViewTest::shouldHaveDefaultValues()
0017 {
0018     SwitchChannelTreeView d;
0019     QVERIFY(d.isHeaderHidden());
0020     QVERIFY(!d.rootIsDecorated());
0021     QCOMPARE(d.horizontalScrollBarPolicy(), Qt::ScrollBarAlwaysOff);
0022     QCOMPARE(d.textElideMode(), Qt::ElideMiddle);
0023     QCOMPARE(d.selectionMode(), QAbstractItemView::SingleSelection);
0024     QCOMPARE(d.selectionBehavior(), QAbstractItemView::SelectRows);
0025     QCOMPARE(d.windowFlags(), Qt::Popup | Qt::FramelessWindowHint);
0026 }
0027 
0028 #include "moc_switchchanneltreeviewtest.cpp"