| 56 | } |
| 57 | |
| 58 | void TestProjectFile::loadSimple() const |
| 59 | { |
| 60 | const QString filepath(QString(SRCDIR) + "/../data/projectfiles/simple.cppcheck"); |
| 61 | ProjectFile pfile(filepath); |
| 62 | QVERIFY(pfile.read()); |
| 63 | QCOMPARE(pfile.getRootPath(), QString("../..")); |
| 64 | QStringList includes = pfile.getIncludeDirs(); |
| 65 | QCOMPARE(includes.size(), 2); |
| 66 | QCOMPARE(includes[0], QString("lib/")); |
| 67 | QCOMPARE(includes[1], QString("cli/")); |
| 68 | QStringList paths = pfile.getCheckPaths(); |
| 69 | QCOMPARE(paths.size(), 2); |
| 70 | QCOMPARE(paths[0], QString("gui/")); |
| 71 | QCOMPARE(paths[1], QString("test/")); |
| 72 | QStringList excludes = pfile.getExcludedPaths(); |
| 73 | QCOMPARE(excludes.size(), 1); |
| 74 | QCOMPARE(excludes[0], QString("gui/temp/")); |
| 75 | QStringList defines = pfile.getDefines(); |
| 76 | QCOMPARE(defines.size(), 1); |
| 77 | QCOMPARE(defines[0], QString("FOO")); |
| 78 | } |
| 79 | |
| 80 | // Test that project file with old 'ignore' element works |
| 81 | void TestProjectFile::loadSimpleWithIgnore() const |
nothing calls this directly
no test coverage detected