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

Function deep_argument_nesting_probe

tests/test_extraction.c:11625–11657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11623}
11624
11625static int deep_argument_nesting_probe(void) {
11626 const uint32_t attribute_len = (uint32_t)strlen("obj.handler");
11627 uint32_t core_at = 0;
11628 char *src = build_nested_source("f(cb=", "obj.handler", ")\n", LABELED_WRAPPERS, &core_at);
11629 if (!src) {
11630 return 4;
11631 }
11632 int rc = 0;
11633 CBMFileResult *wrapped = extract(src, CBM_LANG_PYTHON, "t", "deep_arg.py");
11634 if (!wrapped || wrapped->has_error || wrapped->parse_incomplete) {
11635 printf(" wrapped argument: extraction failed or the parse was not clean\n");
11636 rc = 1;
11637 } else {
11638 rc |= handler_candidate_site(wrapped, core_at - LABELED_WRAPPERS,
11639 core_at + attribute_len + LABELED_WRAPPERS, "wrapped");
11640 }
11641 if (wrapped) {
11642 cbm_free_result(wrapped);
11643 }
11644 free(src);
11645
11646 CBMFileResult *bare = extract("f(cb=obj.handler)\n", CBM_LANG_PYTHON, "t", "bare_arg.py");
11647 if (!bare || bare->has_error || bare->parse_incomplete) {
11648 printf(" bare argument: extraction failed or the parse was not clean\n");
11649 rc = 1;
11650 } else {
11651 rc |= handler_candidate_site(bare, 5, 5 + attribute_len, "bare");
11652 }
11653 if (bare) {
11654 cbm_free_result(bare);
11655 }
11656 return rc;
11657}
11658
11659TEST(extract_deep_argument_nesting_completes) {
11660 char why[160];

Callers

nothing calls this directly

Calls 4

build_nested_sourceFunction · 0.85
handler_candidate_siteFunction · 0.85
cbm_free_resultFunction · 0.85
extractFunction · 0.70

Tested by

no test coverage detected