| 297 | } |
| 298 | |
| 299 | void TestKdevFormatSource::runTest() const |
| 300 | { |
| 301 | QFETCH(QString, path); |
| 302 | QFETCH(bool, isFound); |
| 303 | QFETCH(bool, isRead); |
| 304 | QFETCH(bool, isApplied); |
| 305 | QFETCH(QStringList, lines); |
| 306 | |
| 307 | KDevFormatFile formatFile(path, path); |
| 308 | |
| 309 | QCOMPARE(formatFile.find(), isFound); |
| 310 | |
| 311 | if (isFound) |
| 312 | QCOMPARE(formatFile.read(), isRead); |
| 313 | |
| 314 | if (isRead) |
| 315 | QCOMPARE(formatFile.apply(), isApplied); |
| 316 | |
| 317 | QStringList processedLines; |
| 318 | QCOMPARE(readLines(path, processedLines), true); |
| 319 | |
| 320 | QCOMPARE(processedLines, lines); |
| 321 | } |
| 322 | |
| 323 | bool TestKdevFormatSource::mkPath(const QString& path) const |
| 324 | { |