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

Function ovr_two_targets

tests/test_pipeline.c:13626–13637  ·  view source on GitHub ↗

Exactly two different targets, each once, independent of edge order. */

Source from the content-addressed store, hash-verified

13624
13625/* Exactly two different targets, each once, independent of edge order. */
13626static bool ovr_two_targets(cbm_gbuf_t *gb, int64_t method, int64_t first, int64_t second) {
13627 const cbm_gbuf_edge_t **edges = NULL;
13628 int count = 0;
13629 cbm_gbuf_find_edges_by_source_type(gb, method, "OVERRIDE", &edges, &count);
13630 int first_count = 0;
13631 int second_count = 0;
13632 for (int i = 0; i < count; i++) {
13633 first_count += edges[i]->target_id == first;
13634 second_count += edges[i]->target_id == second;
13635 }
13636 return first != second && count == 2 && first_count == 1 && second_count == 1;
13637}
13638
13639TEST(override_explicit_walks_to_nearest_declaring_ancestor) {
13640 cbm_gbuf_t *gb = cbm_gbuf_new("test-proj", "/tmp/test");

Callers 1

test_pipeline.cFile · 0.85

Calls 1

Tested by

no test coverage detected