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

Function es_edge_present

tests/test_edge_structural.c:289–299  ·  view source on GitHub ↗

Index `files`, assert `edge` appears at least `floor` times. * On failure, dump the full edge histogram. */

Source from the content-addressed store, hash-verified

287/* Index `files`, assert `edge` appears at least `floor` times.
288 * On failure, dump the full edge histogram. */
289static int es_edge_present(const ES_LangFile *files, int nfiles, const char *edge, int floor) {
290 ES_LangProj lp;
291 cbm_store_t *store = es_lang_index_files(&lp, files, nfiles);
292 int got = store ? cbm_store_count_edges_by_type(store, lp.project, edge) : -1;
293 if (got < floor) {
294 fprintf(stderr, " [ES-EDGE] FAIL %-20s got=%d expected>=%d\n", edge, got, floor);
295 es_dump_edge_histogram(store, lp.project);
296 }
297 es_lang_cleanup(&lp, store);
298 return got >= floor;
299}
300
301static int es_exact_edge_by_name(const ES_LangFile *files, int nfiles, const char *edge_type,
302 const char *source_name, const char *target_name) {

Callers 1

Calls 4

es_lang_index_filesFunction · 0.85
es_dump_edge_histogramFunction · 0.85
es_lang_cleanupFunction · 0.85

Tested by

no test coverage detected