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

Method RecordCoverage

testing/testrunner/coverage_index.cc:186–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184} // namespace
185
186void CoverageIndex::RecordCoverage(int64_t node_id, const cel::Value& value) {
187 NodeCoverageStats& stats = node_coverage_stats_[node_id];
188 stats.covered = true;
189 if (node_coverage_stats_[node_id].is_boolean_node && value.IsBool()) {
190 if (value.AsBool()->NativeValue()) {
191 stats.has_true_branch = true;
192 } else {
193 stats.has_false_branch = true;
194 }
195 }
196}
197
198void CoverageIndex::Init(const cel::expr::CheckedExpr& checked_expr) {
199 checked_expr_ = checked_expr;

Callers 1

Calls 3

IsBoolMethod · 0.45
NativeValueMethod · 0.45
AsBoolMethod · 0.45

Tested by

no test coverage detected