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

Function cx_fixture_dir_for

tests/test_complexity.c:170–182  ·  view source on GitHub ↗

Fixture-dir provider: tests/fixtures/complexity/ / — every file in * it 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

168 * it is copied verbatim into each module dir. Lets a new language join the
169 * guard by dropping fixtures, with no edit to this suite. */
170static bool cx_fixture_dir_for(CBMLanguage lang, char *out, size_t cap) {
171 const char *name = cbm_language_name(lang);
172 if (!name || !name[0]) {
173 return false;
174 }
175 snprintf(out, cap, "tests/fixtures/complexity/%s", name);
176 cbm_dir_t *d = cbm_opendir(out);
177 if (!d) {
178 return false;
179 }
180 cbm_closedir(d);
181 return true;
182}
183
184static int cx_copy_file(const char *src, const char *dst) {
185 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