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

Function cx_fixture_dir_for

tests/test_complexity.c:185–197  ·  view source on GitHub ↗

Fixture-dir provider: tests/fixtures/complexity/ / — every file * and directory in it (dot-names aside) is copied verbatim into each module * dir. Lets a new language join the * guard by dropping fixtures, with no edit to this suite. */

Source from the content-addressed store, hash-verified

183 * dir. Lets a new language join the
184 * guard by dropping fixtures, with no edit to this suite. */
185static bool cx_fixture_dir_for(CBMLanguage lang, char *out, size_t cap) {
186 const char *name = cbm_language_name(lang);
187 if (!name || !name[0]) {
188 return false;
189 }
190 snprintf(out, cap, "tests/fixtures/complexity/%s", name);
191 cbm_dir_t *d = cbm_opendir(out);
192 if (!d) {
193 return false;
194 }
195 cbm_closedir(d);
196 return true;
197}
198
199static int cx_copy_file(const char *src, const char *dst) {
200 FILE *in = fopen(src, "rb");

Callers 2

cx_build_corpusFunction · 0.85
test_complexity.cFile · 0.85

Calls 3

cbm_language_nameFunction · 0.85
cbm_opendirFunction · 0.85
cbm_closedirFunction · 0.85

Tested by

no test coverage detected