MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / GetCoverageReport

Method GetCoverageReport

testing/testrunner/coverage_index.cc:208–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208CoverageIndex::CoverageReport CoverageIndex::GetCoverageReport() const {
209 CoverageReport report;
210 if (node_coverage_stats_.empty()) {
211 return report;
212 }
213
214 std::string dot_graph = std::string(kDigraphHeader);
215 TraverseAndCalculateCoverage(checked_expr_, navigable_ast_.Root(),
216 node_coverage_stats_, true, "", report,
217 dot_graph);
218 dot_graph += "}\n";
219 report.dot_graph = dot_graph;
220 report.cel_expression =
221 google::api::expr::Unparse(checked_expr_).value_or("");
222 return report;
223}
224
225void CoverageIndex::WriteLCOV(absl::string_view path) {
226 std::ofstream file(std::string(path).c_str());

Callers 2

TearDownMethod · 0.80
TESTFunction · 0.80

Calls 3

UnparseFunction · 0.85
emptyMethod · 0.45

Tested by 1

TESTFunction · 0.64