cmParseBlanketJSCoverage.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc.
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmParseBlanketJSCoverage_h
  11. #define cmParseBlanketJSCoverage_h
  12. #include <cmConfigure.h> // IWYU pragma: keep
  13. #include <string>
  14. #include <vector>
  15. class cmCTest;
  16. class cmCTestCoverageHandlerContainer;
  17. /** \class cmParseBlanketJSCoverage
  18. * \brief Parse BlanketJS coverage information
  19. *
  20. * This class is used to parse BlanketJS(Pascal) coverage information
  21. * generated by the Blanket.js library when used in conjunction with the
  22. * test runner mocha.js, which is used to write out the JSON format.
  23. *
  24. * Blanket.js:
  25. * http://blanketjs.org/
  26. *
  27. * Mocha.js
  28. * http://visionmedia.github.io/mocha/
  29. */
  30. class cmParseBlanketJSCoverage
  31. {
  32. public:
  33. cmParseBlanketJSCoverage(cmCTestCoverageHandlerContainer& cont,
  34. cmCTest* ctest);
  35. bool LoadCoverageData(std::vector<std::string> files);
  36. // Read the JSON output
  37. bool ReadJSONFile(std::string const& file);
  38. protected:
  39. class JSONParser;
  40. cmCTestCoverageHandlerContainer& Coverage;
  41. cmCTest* CTest;
  42. };
  43. #endif