Test that project file with old 'ignore' element works
| 79 | |
| 80 | // Test that project file with old 'ignore' element works |
| 81 | void TestProjectFile::loadSimpleWithIgnore() const |
| 82 | { |
| 83 | const QString filepath(QString(SRCDIR) + "/../data/projectfiles/simple_ignore.cppcheck"); |
| 84 | ProjectFile pfile(filepath); |
| 85 | QVERIFY(pfile.read()); |
| 86 | QCOMPARE(pfile.getRootPath(), QString("../..")); |
| 87 | QStringList includes = pfile.getIncludeDirs(); |
| 88 | QCOMPARE(includes.size(), 2); |
| 89 | QCOMPARE(includes[0], QString("lib/")); |
| 90 | QCOMPARE(includes[1], QString("cli/")); |
| 91 | QStringList paths = pfile.getCheckPaths(); |
| 92 | QCOMPARE(paths.size(), 2); |
| 93 | QCOMPARE(paths[0], QString("gui/")); |
| 94 | QCOMPARE(paths[1], QString("test/")); |
| 95 | QStringList excludes = pfile.getExcludedPaths(); |
| 96 | QCOMPARE(excludes.size(), 1); |
| 97 | QCOMPARE(excludes[0], QString("gui/temp/")); |
| 98 | QStringList defines = pfile.getDefines(); |
| 99 | QCOMPARE(defines.size(), 1); |
| 100 | QCOMPARE(defines[0], QString("FOO")); |
| 101 | } |
| 102 | |
| 103 | void TestProjectFile::loadSimpleNoroot() const |
| 104 | { |
nothing calls this directly
no test coverage detected