Changeset View
Changeset View
Standalone View
Standalone View
autotests/kcolorschemetest.cpp
Show All 26 Lines | |||||
27 | class KColorSchemeTest : public QObject | 27 | class KColorSchemeTest : public QObject | ||
28 | { | 28 | { | ||
29 | Q_OBJECT | 29 | Q_OBJECT | ||
30 | 30 | | |||
31 | private Q_SLOTS: | 31 | private Q_SLOTS: | ||
32 | void benchConstruction_data() | 32 | void benchConstruction_data() | ||
33 | { | 33 | { | ||
34 | KColorSchemeManager manager; | 34 | KColorSchemeManager manager; | ||
35 | if (!manager.model()->rowCount()) { | 35 | if (manager.model()->rowCount() <= 1) { | ||
36 | QSKIP("no scheme files found, cannot run benchmark"); | 36 | QSKIP("no scheme files found, cannot run benchmark"); | ||
37 | } | 37 | } | ||
38 | 38 | | |||
39 | const auto anyScheme = manager.model()->index(0, 0).data(Qt::UserRole).toString(); | 39 | const auto anyScheme = manager.model()->index(1, 0).data(Qt::UserRole).toString(); | ||
40 | QVERIFY(QFile::exists(anyScheme)); | 40 | QVERIFY(QFile::exists(anyScheme)); | ||
41 | 41 | | |||
42 | QTest::addColumn<QString>("file"); | 42 | QTest::addColumn<QString>("file"); | ||
43 | 43 | | |||
44 | QTest::newRow("default") << QString(); | 44 | QTest::newRow("default") << QString(); | ||
45 | QTest::newRow("explicit") << anyScheme; | 45 | QTest::newRow("explicit") << anyScheme; | ||
46 | } | 46 | } | ||
47 | 47 | | |||
Show All 14 Lines |