MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / loadSimpleNoroot

Method loadSimpleNoroot

gui/test/projectfile/testprojectfile.cpp:103–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void TestProjectFile::loadSimpleNoroot() const
104{
105 const QString filepath(QString(SRCDIR) + "/../data/projectfiles/simple_noroot.cppcheck");
106 ProjectFile pfile(filepath);
107 QVERIFY(pfile.read());
108 QCOMPARE(pfile.getRootPath(), QString());
109 QStringList includes = pfile.getIncludeDirs();
110 QCOMPARE(includes.size(), 2);
111 QCOMPARE(includes[0], QString("lib/"));
112 QCOMPARE(includes[1], QString("cli/"));
113 QStringList paths = pfile.getCheckPaths();
114 QCOMPARE(paths.size(), 2);
115 QCOMPARE(paths[0], QString("gui/"));
116 QCOMPARE(paths[1], QString("test/"));
117 QStringList excludes = pfile.getExcludedPaths();
118 QCOMPARE(excludes.size(), 1);
119 QCOMPARE(excludes[0], QString("gui/temp/"));
120 QStringList defines = pfile.getDefines();
121 QCOMPARE(defines.size(), 1);
122 QCOMPARE(defines[0], QString("FOO"));
123}
124
125void TestProjectFile::getAddonFilePath() const
126{

Callers

nothing calls this directly

Calls 8

getRootPathMethod · 0.80
getIncludeDirsMethod · 0.80
getDefinesMethod · 0.80
QStringClass · 0.50
readMethod · 0.45
sizeMethod · 0.45
getCheckPathsMethod · 0.45
getExcludedPathsMethod · 0.45

Tested by

no test coverage detected