Description
Parse one bounded LCOV branch record.
Coverage records distinguish source locations, hit counts and unknown observations. Parsing one LCOV line or branch token preserves its metadata but does not establish that source mapping, collection or overall coverage is correct.
Parse one bounded LCOV branch record.
When to use this tool
Use Development: LCOV Branch Record Line Parser when inspecting one bounded coverage-record token.
How to use the tool and how it works
- Enter line. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Parse one bounded LCOV branch record. Accept BRDA: with numeric line/block/branch and numeric taken or -; line must be positive; unknown taken returns -1 with executionKnown = false.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| line | Line | Required. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Returned object; expand its named members below. | Required. Object. |
| result.lineNumber | Line Number | Calculated result member: number. |
| result.block | Block | Calculated result member: number. |
| result.branch | Branch | Calculated result member: number. |
| result.taken | Parsed count, or -1 sentinel for the literal unknown token. | Calculated result member: number. |
| result.executionKnown | False when the taken field is the unknown marker; inspect before using taken numerically. | Calculated result member: boolean. |
{
"input": {
"line": "BRDA:10,0,1,-"
},
"output": {
"result": {
"lineNumber": 10,
"block": 0,
"branch": 1,
"taken": -1,
"executionKnown": false
}
}
} Limitations and assumptions
- This sentinel differs from the separate count parser's zero; no source branch is verified.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use the complete coverage report and matching source revision for aggregation, validation and meaningful testing conclusions.
References
Similar or alternative tools
- LCOV Branch Taken Missing Value
Parse LCOV branch-taken count or unknown sentinel.
- Development: LCOV Function Call Record Parser
Parse one LCOV function-hit record.