Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/outputview/tests/test_filteringstrategy.cpp
Show First 20 Lines • Show All 234 Lines • ▼ Show 20 Line(s) | 218 | { | |||
---|---|---|---|---|---|
235 | for (TestPathType pathType : {UnixFilePathNoSpaces, UnixFilePathWithSpaces}) { | 235 | for (TestPathType pathType : {UnixFilePathNoSpaces, UnixFilePathWithSpaces}) { | ||
236 | QTest::newRowForPathType("python-error-line", pathType) | 236 | QTest::newRowForPathType("python-error-line", pathType) | ||
237 | << buildPythonErrorLine(pathType) << FilteredItem::InvalidItem << FilteredItem::InvalidItem; | 237 | << buildPythonErrorLine(pathType) << FilteredItem::InvalidItem << FilteredItem::InvalidItem; | ||
238 | } | 238 | } | ||
239 | } | 239 | } | ||
240 | 240 | | |||
241 | void TestFilteringStrategy::testScriptErrorFilterStrategy() | 241 | void TestFilteringStrategy::testScriptErrorFilterStrategy() | ||
242 | { | 242 | { | ||
243 | #ifdef Q_OS_WIN | ||||
244 | TestPathType pathTypeToUse = WindowsFilePathNoSpaces; | ||||
245 | #else | ||||
246 | TestPathType pathTypeToUse = UnixFilePathNoSpaces; | ||||
247 | #endif | ||||
243 | QFETCH(QString, line); | 248 | QFETCH(QString, line); | ||
244 | QFETCH(FilteredItem::FilteredOutputItemType, expectedError); | 249 | QFETCH(FilteredItem::FilteredOutputItemType, expectedError); | ||
245 | QFETCH(FilteredItem::FilteredOutputItemType, expectedAction); | 250 | QFETCH(FilteredItem::FilteredOutputItemType, expectedAction); | ||
246 | ScriptErrorFilterStrategy testee; | 251 | QUrl scripturl = QUrl::fromLocalFile( projectPath(pathTypeToUse) ); | ||
252 | ScriptErrorFilterStrategy testee(scripturl); | ||||
247 | FilteredItem item1 = testee.errorInLine(line); | 253 | FilteredItem item1 = testee.errorInLine(line); | ||
248 | QCOMPARE(item1.type, expectedError); | 254 | QCOMPARE(item1.type, expectedError); | ||
249 | item1 = testee.actionInLine(line); | 255 | item1 = testee.actionInLine(line); | ||
250 | QCOMPARE(item1.type, expectedAction); | 256 | QCOMPARE(item1.type, expectedAction); | ||
251 | } | 257 | } | ||
252 | 258 | | |||
253 | void TestFilteringStrategy::testNativeAppErrorFilterStrategy_data() | 259 | void TestFilteringStrategy::testNativeAppErrorFilterStrategy_data() | ||
254 | { | 260 | { | ||
▲ Show 20 Lines • Show All 312 Lines • Show Last 20 Lines |