cmParseGTMCoverage.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <string>
  6. #include "cmParseMumpsCoverage.h"
  7. class cmCTest;
  8. class cmCTestCoverageHandlerContainer;
  9. /** \class cmParseGTMCoverage
  10. * \brief Parse GTM coverage information
  11. *
  12. * This class is used to parse GTM coverage information for
  13. * mumps.
  14. */
  15. class cmParseGTMCoverage : public cmParseMumpsCoverage
  16. {
  17. public:
  18. cmParseGTMCoverage(cmCTestCoverageHandlerContainer& cont, cmCTest* ctest);
  19. protected:
  20. // implement virtual from parent
  21. bool LoadCoverageData(std::string const& dir) override;
  22. // Read a single mcov file
  23. bool ReadMCovFile(const char* f);
  24. // find out what line in a mumps file (filepath) the given entry point
  25. // or function is. lineoffset is set by this method.
  26. bool FindFunctionInMumpsFile(std::string const& filepath,
  27. std::string const& function, int& lineoffset);
  28. // parse a line from a .mcov file, and fill in the
  29. // routine, function, linenumber and coverage count
  30. bool ParseMCOVLine(std::string const& line, std::string& routine,
  31. std::string& function, int& linenumber, int& count);
  32. };