* added FileManager that keeps track of the files analyzed by the project. It therefore checks if files get added, updated or deleted from the source- and include folders. * refactored ASTVisitor::hasValidLocation() and implemented one version that search for the location in the currently parsed file and one that searches in all the project's source files. * quickfix: switched order in FileManager so that header files are parsed first. * created folder for helper classes used in tests. * added test code for FileManager * adjusted test code for Parser Tests.
19 lines
378 B
C++
19 lines
378 B
C++
#include "TestStorage.h"
|
|
|
|
#include "utility/text/TextAccess.h"
|
|
#include "data/parser/cxx/CxxParser.h"
|
|
#include "TestFileManager.h"
|
|
|
|
void TestStorage::parseCxxCode(std::string code)
|
|
{
|
|
clear();
|
|
TestFileManager fm;
|
|
CxxParser parser(this, &fm);
|
|
parser.parseFile(TextAccess::createFromString(code));
|
|
}
|
|
|
|
const Graph& TestStorage::getGraph() const
|
|
{
|
|
return Storage::getGraph();
|
|
}
|