MCPcopy Create free account
hub / github.com/KDE/kwin / topLevelTest

Method topLevelTest

autotests/integration/debug_console_test.cpp:94–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void DebugConsoleTest::topLevelTest()
95{
96 DebugConsoleModel model;
97 QCOMPARE(model.rowCount(QModelIndex()), 4);
98 QCOMPARE(model.columnCount(QModelIndex()), 2);
99 QFETCH(int, row);
100 QFETCH(int, column);
101 const QModelIndex index = model.index(row, column, QModelIndex());
102 QTEST(index.isValid(), "expectedValid");
103 if (index.isValid()) {
104 QVERIFY(!model.parent(index).isValid());
105 QVERIFY(model.data(index, Qt::DisplayRole).isValid());
106 QCOMPARE(model.data(index, Qt::DisplayRole).userType(), int(QMetaType::QString));
107 for (int i = Qt::DecorationRole; i <= Qt::UserRole; i++) {
108 QVERIFY(!model.data(index, i).isValid());
109 }
110 }
111}
112
113#if KWIN_BUILD_X11
114void DebugConsoleTest::testX11Window()

Callers

nothing calls this directly

Calls 6

rowCountMethod · 0.45
columnCountMethod · 0.45
indexMethod · 0.45
isValidMethod · 0.45
parentMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected