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

Function td_conventions

src/discover/test_conventions.c:149–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149static bool td_conventions(cbm_test_declarations_t *declarations, yyjson_val *value) {
150 if (!yyjson_is_arr(value))
151 return false;
152 size_t count = yyjson_arr_size(value);
153 if (count > INT_MAX || count > SIZE_MAX / sizeof(*declarations->items))
154 return false;
155 if (!count)
156 return true;
157 declarations->items =
158 cbm_arena_calloc(&declarations->arena, count * sizeof(*declarations->items));
159 if (!declarations->items)
160 return false;
161 size_t index, maximum;
162 yyjson_val *record;
163 yyjson_arr_foreach(value, index, maximum, record) {
164 if (!td_record(declarations, record, &declarations->items[index]))
165 return false;
166 }
167 declarations->count = (int)count;
168 return true;
169}
170
171static bool td_presets(cbm_test_declarations_t *declarations, yyjson_val *value) {
172 static const char *const names[CBM_TEST_PRESET_COUNT] = {

Callers 1

td_projectFunction · 0.85

Calls 2

cbm_arena_callocFunction · 0.85
td_recordFunction · 0.85

Tested by

no test coverage detected