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

Function es_edge_present

tests/test_edge_structural.c:269–279  ·  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

267/* Index `files`, assert `edge` appears at least `floor` times.
268 * On failure, dump the full edge histogram. */
269static int es_edge_present(const ES_LangFile *files, int nfiles, const char *edge, int floor) {
270 ES_LangProj lp;
271 cbm_store_t *store = es_lang_index_files(&lp, files, nfiles);
272 int got = store ? cbm_store_count_edges_by_type(store, lp.project, edge) : -1;
273 if (got < floor) {
274 fprintf(stderr, " [ES-EDGE] FAIL %-20s got=%d expected>=%d\n", edge, got, floor);
275 es_dump_edge_histogram(store, lp.project);
276 }
277 es_lang_cleanup(&lp, store);
278 return got >= floor;
279}
280
281/* ══════════════════════════════════════════════════════════════════
282 * FAMILY 1: CALLS cross-file

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