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

Function fixture_node_count

tests/test_pipeline.c:1917–1935  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1915}
1916
1917static int fixture_node_count(cbm_store_t *store, const char *project, const char *path,
1918 const char *name, const char *label) {
1919 cbm_node_t *nodes = NULL;
1920 int count = 0;
1921 if (cbm_store_find_nodes_by_name(store, project, name, &nodes, &count) != CBM_STORE_OK) {
1922 return -1;
1923 }
1924 int found = 0;
1925 for (int i = 0; i < count; i++) {
1926 if (nodes[i].file_path && nodes[i].label && strcmp(nodes[i].file_path, path) == 0 &&
1927 strcmp(nodes[i].label, label) == 0) {
1928 found++;
1929 }
1930 }
1931 if (nodes) {
1932 cbm_store_free_nodes(nodes, count);
1933 }
1934 return found;
1935}
1936
1937/* Edges of `edge_type` from the node named `source_name` to the node named
1938 * `target_name` that carries `target_label`. */

Callers 2

test_pipeline.cFile · 0.85

Calls 2

cbm_store_free_nodesFunction · 0.85

Tested by

no test coverage detected