2014-10-24 01:03:30 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc.
|
|
|
|
|
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
|
|
|
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
|
|
|
|
|
|
|
#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
|