cmParseBlanketJSCoverage.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmParseBlanketJSCoverage_h
  4. #define cmParseBlanketJSCoverage_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include <vector>
  8. class cmCTest;
  9. class cmCTestCoverageHandlerContainer;
  10. /** \class cmParseBlanketJSCoverage
  11. * \brief Parse BlanketJS coverage information
  12. *
  13. * This class is used to parse BlanketJS(Pascal) coverage information
  14. * generated by the Blanket.js library when used in conjunction with the
  15. * test runner mocha.js, which is used to write out the JSON format.
  16. *
  17. * Blanket.js:
  18. * http://blanketjs.org/
  19. *
  20. * Mocha.js
  21. * http://visionmedia.github.io/mocha/
  22. */
  23. class cmParseBlanketJSCoverage
  24. {
  25. public:
  26. cmParseBlanketJSCoverage(cmCTestCoverageHandlerContainer& cont,
  27. cmCTest* ctest);
  28. bool LoadCoverageData(std::vector<std::string> files);
  29. // Read the JSON output
  30. bool ReadJSONFile(std::string const& file);
  31. protected:
  32. class JSONParser;
  33. cmCTestCoverageHandlerContainer& Coverage;
  34. cmCTest* CTest;
  35. };
  36. #endif