cmParseBlanketJSCoverage.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 <vector>
  7. class cmCTest;
  8. class cmCTestCoverageHandlerContainer;
  9. /** \class cmParseBlanketJSCoverage
  10. * \brief Parse BlanketJS coverage information
  11. *
  12. * This class is used to parse BlanketJS(Pascal) coverage information
  13. * generated by the Blanket.js library when used in conjunction with the
  14. * test runner mocha.js, which is used to write out the JSON format.
  15. *
  16. * Blanket.js:
  17. * http://blanketjs.org/
  18. *
  19. * Mocha.js
  20. * http://visionmedia.github.io/mocha/
  21. */
  22. class cmParseBlanketJSCoverage
  23. {
  24. public:
  25. cmParseBlanketJSCoverage(cmCTestCoverageHandlerContainer& cont,
  26. cmCTest* ctest);
  27. bool LoadCoverageData(std::vector<std::string> const& files);
  28. // Read the JSON output
  29. bool ReadJSONFile(std::string const& file);
  30. protected:
  31. class JSONParser;
  32. cmCTestCoverageHandlerContainer& Coverage;
  33. cmCTest* CTest;
  34. };