2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2014-10-24 01:03:30 +04:00
|
|
|
#ifndef cmParseBlanketJSCoverage_h
|
|
|
|
#define cmParseBlanketJSCoverage_h
|
|
|
|
|
2016-08-24 23:01:40 +03:00
|
|
|
#include <cmConfigure.h> // IWYU pragma: keep
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class cmCTest;
|
|
|
|
class cmCTestCoverageHandlerContainer;
|
2014-10-24 01:03:30 +04:00
|
|
|
|
|
|
|
/** \class cmParseBlanketJSCoverage
|
|
|
|
* \brief Parse BlanketJS coverage information
|
|
|
|
*
|
|
|
|
* This class is used to parse BlanketJS(Pascal) coverage information
|
|
|
|
* generated by the Blanket.js library when used in conjunction with the
|
|
|
|
* test runner mocha.js, which is used to write out the JSON format.
|
|
|
|
*
|
|
|
|
* Blanket.js:
|
|
|
|
* http://blanketjs.org/
|
|
|
|
*
|
|
|
|
* Mocha.js
|
|
|
|
* http://visionmedia.github.io/mocha/
|
|
|
|
*/
|
|
|
|
class cmParseBlanketJSCoverage
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmParseBlanketJSCoverage(cmCTestCoverageHandlerContainer& cont,
|
2016-05-16 17:34:04 +03:00
|
|
|
cmCTest* ctest);
|
2014-10-24 01:03:30 +04:00
|
|
|
bool LoadCoverageData(std::vector<std::string> files);
|
|
|
|
// Read the JSON output
|
2016-05-26 22:58:51 +03:00
|
|
|
bool ReadJSONFile(std::string const& file);
|
2014-10-24 01:03:30 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
class JSONParser;
|
2016-08-24 23:01:40 +03:00
|
|
|
|
2014-10-24 01:03:30 +04:00
|
|
|
cmCTestCoverageHandlerContainer& Coverage;
|
|
|
|
cmCTest* CTest;
|
|
|
|
};
|
|
|
|
#endif
|