Changeset View
Changeset View
Standalone View
Standalone View
autotests/kfileplacesviewtest.cpp
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | |||||
74 | 74 | | |||
75 | void KFilePlacesViewTest::testUrlChanged_data() | 75 | void KFilePlacesViewTest::testUrlChanged_data() | ||
76 | { | 76 | { | ||
77 | QTest::addColumn<int>("row"); | 77 | QTest::addColumn<int>("row"); | ||
78 | QTest::addColumn<QString>("expectedUrl"); | 78 | QTest::addColumn<QString>("expectedUrl"); | ||
79 | 79 | | |||
80 | const QDate currentDate = QDate::currentDate(); | 80 | const QDate currentDate = QDate::currentDate(); | ||
81 | const QDate yesterdayDate = currentDate.addDays(-1); | 81 | const QDate yesterdayDate = currentDate.addDays(-1); | ||
82 | QTest::newRow("Today") << 4 << QStringLiteral("timeline:/today"); | 82 | QTest::newRow("Today") << 3 << QStringLiteral("timeline:/today"); | ||
83 | QTest::newRow("Yesterday") << 5 << QString("timeline:/%1-%2/%1-%2-%3") | 83 | QTest::newRow("Yesterday") << 4 << QString("timeline:/%1-%2/%1-%2-%3") | ||
84 | .arg(yesterdayDate.year()) | 84 | .arg(yesterdayDate.year()) | ||
85 | .arg(yesterdayDate.month(), 2, 10, QChar('0')) | 85 | .arg(yesterdayDate.month(), 2, 10, QChar('0')) | ||
86 | .arg(yesterdayDate.day(), 2, 10, QChar('0')); | 86 | .arg(yesterdayDate.day(), 2, 10, QChar('0')); | ||
87 | 87 | | |||
88 | // search | 88 | // search | ||
89 | QTest::newRow("Documents") << 6 << QStringLiteral("baloosearch:/documents"); | 89 | QTest::newRow("Documents") << 5 << QStringLiteral("baloosearch:/documents"); | ||
90 | QTest::newRow("Images") << 7 << QStringLiteral("baloosearch:/images"); | 90 | QTest::newRow("Images") << 6 << QStringLiteral("baloosearch:/images"); | ||
91 | QTest::newRow("Audio Files") << 8 << QStringLiteral("baloosearch:/audio"); | 91 | QTest::newRow("Audio Files") << 7 << QStringLiteral("baloosearch:/audio"); | ||
92 | QTest::newRow("Videos") << 9 << QStringLiteral("baloosearch:/videos"); | 92 | QTest::newRow("Videos") << 8 << QStringLiteral("baloosearch:/videos"); | ||
93 | } | 93 | } | ||
94 | 94 | | |||
95 | void KFilePlacesViewTest::testUrlChanged() | 95 | void KFilePlacesViewTest::testUrlChanged() | ||
96 | { | 96 | { | ||
97 | QFETCH(int, row); | 97 | QFETCH(int, row); | ||
98 | QFETCH(QString, expectedUrl); | 98 | QFETCH(QString, expectedUrl); | ||
99 | 99 | | |||
100 | KFilePlacesView pv; | 100 | KFilePlacesView pv; | ||
Show All 17 Lines |