MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / range_covers_line

Function range_covers_line

tests/test_parse_coverage.c:945–959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

943 "}\n"; /* 13 */
944
945static int range_covers_line(const char *ranges, unsigned int line) {
946 const char *p = ranges;
947 while (p && *p) {
948 unsigned int s = 0;
949 unsigned int e = 0;
950 if (sscanf(p, "%u-%u", &s, &e) == 2 && s <= line && line <= e) {
951 return 1;
952 }
953 p = strchr(p, ',');
954 if (p) {
955 p++;
956 }
957 }
958 return 0;
959}
960
961TEST(coverage_range_never_covers_an_extracted_definition) {
962 CBMFileResult *r = do_extract(C_JUNK_BETWEEN_FUNCTIONS, CBM_LANG_C, "junk.c");

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected