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

Function dg_arrows

tests/test_diagrams.c:77–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77static int dg_arrows(const CBMFileResult *r, const char *from_suffix, const char *to_suffix,
78 const char *style, const char *label) {
79 int n = 0;
80 size_t fl = strlen(from_suffix);
81 size_t tl = strlen(to_suffix);
82 for (int i = 0; i < r->diagram_arrows.count; i++) {
83 const CBMDiagramArrow *a = &r->diagram_arrows.items[i];
84 size_t al = strlen(a->from_qn);
85 size_t bl = strlen(a->to_qn);
86 if (al >= fl && strcmp(a->from_qn + al - fl, from_suffix) == 0 && bl >= tl &&
87 strcmp(a->to_qn + bl - tl, to_suffix) == 0 && strcmp(a->style, style) == 0 &&
88 strcmp(a->label ? a->label : "", label) == 0) {
89 n++;
90 }
91 }
92 if (n != 1) {
93 printf(" arrow %s -> %s [%s \"%s\"]: %d found\n", from_suffix, to_suffix, style, label, n);
94 }
95 return n;
96}
97
98TEST(diagrams_markdown_mermaid) {
99 CBMFileResult *r = dm_extract(DG_DOC, CBM_LANG_MARKDOWN, "docs/arch.md");

Callers 1

test_diagrams.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected