diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2012-05-01 17:35:07 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2012-05-01 17:35:07 (GMT) |
commit | 319eeb0247f51bb2d380261ce7d63c7ce5020ed0 (patch) | |
tree | 6885326a833ee4cca3416ed518601f47ca6c986e /Source/CTest/cmParseGTMCoverage.h | |
parent | 72210c266238607e12c12ed7e983efed557fa784 (diff) | |
download | CMake-319eeb0247f51bb2d380261ce7d63c7ce5020ed0.zip CMake-319eeb0247f51bb2d380261ce7d63c7ce5020ed0.tar.gz CMake-319eeb0247f51bb2d380261ce7d63c7ce5020ed0.tar.bz2 |
Add test for mumps coverage. Also refactor code to prepare for cache coverage.
Add a simple test to make sure the GTM mumps coverage is working.
Also refactor the code so that cache coverage can be added.
Diffstat (limited to 'Source/CTest/cmParseGTMCoverage.h')
-rw-r--r-- | Source/CTest/cmParseGTMCoverage.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/Source/CTest/cmParseGTMCoverage.h b/Source/CTest/cmParseGTMCoverage.h index d4e901d..c6d7ef9 100644 --- a/Source/CTest/cmParseGTMCoverage.h +++ b/Source/CTest/cmParseGTMCoverage.h @@ -13,8 +13,7 @@ #ifndef cmParseGTMCoverage_h #define cmParseGTMCoverage_h -#include "cmStandardIncludes.h" -#include "cmCTestCoverageHandler.h" +#include "cmParseMumpsCoverage.h" /** \class cmParseGTMCoverage * \brief Parse GTM coverage information @@ -22,28 +21,28 @@ * This class is used to parse GTM coverage information for * mumps. */ -class cmParseGTMCoverage +class cmParseGTMCoverage : public cmParseMumpsCoverage { public: cmParseGTMCoverage(cmCTestCoverageHandlerContainer& cont, cmCTest* ctest); - bool ReadGTMCoverage(const char* file); -private: - bool ParseFile(std::string& filepath, - std::string& function, - int& lineoffset); - bool ParseLine(std::string const& line, +protected: + // implement virtual from parent + bool LoadCoverageData(const char* dir); + // Read a single mcov file + bool ReadMCovFile(const char* f); + // find out what line in a mumps file (filepath) the given entry point + // or function is. lineoffset is set by this method. + bool FindFunctionInMumpsFile(std::string const& filepath, + std::string const& function, + int& lineoffset); + // parse a line from a .mcov file, and fill in the + // routine, function, linenumber and coverage count + bool ParseMCOVLine(std::string const& line, std::string& routine, std::string& function, int& linenumber, int& count); - bool LoadPackages(const char* dir); - bool LoadCoverageData(const char* dir); - bool ReadMCovFile(const char* f); - void InitializeFile(std::string& file); - std::map<cmStdString, cmStdString> RoutineToDirectory; - cmCTestCoverageHandlerContainer& Coverage; - cmCTest* CTest; }; |