File indexing completed on 2024-12-01 04:35:29
0001 /* 0002 SPDX-FileCopyrightText: 2018-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "usercompleterfilterproxymodeltest.h" 0008 #include "model/usercompleterfilterproxymodel.h" 0009 #include "model/usercompletermodel.h" 0010 #include <QTest> 0011 QTEST_GUILESS_MAIN(UserCompleterFilterProxyModelTest) 0012 0013 UserCompleterFilterProxyModelTest::UserCompleterFilterProxyModelTest(QObject *parent) 0014 : QObject(parent) 0015 { 0016 } 0017 0018 void UserCompleterFilterProxyModelTest::shouldHaveDefaultValue() 0019 { 0020 UserCompleterFilterProxyModel w; 0021 QCOMPARE(w.rowCount(), 0); 0022 UserCompleterModel source; 0023 w.setSourceModel(&source); 0024 QCOMPARE(w.rowCount(), 0); 0025 QCOMPARE(w.sourceModel(), &source); 0026 } 0027 0028 #include "moc_usercompleterfilterproxymodeltest.cpp"