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

Function td_name_args

src/discover/test_conventions.c:83–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83static bool td_name_args(cbm_test_declarations_t *declarations, yyjson_val *value,
84 cbm_test_declaration_t *item) {
85 if (!yyjson_is_arr(value))
86 return false;
87 size_t count = yyjson_arr_size(value);
88 if (!count || count > TD_MAX_NAME_ARGS)
89 return false;
90 int *args = cbm_arena_alloc(&declarations->arena, count * sizeof(*args));
91 if (!args)
92 return false;
93 size_t index, maximum;
94 yyjson_val *argument;
95 yyjson_arr_foreach(value, index, maximum, argument) {
96 if (!td_argument(argument, &args[index]))
97 return false;
98 }
99 /* Ordered duplicates carry meaning for an adapter, so retain them. */
100 item->name_args = args;
101 item->name_arg_count = (int)count;
102 return true;
103}
104
105static bool td_record(cbm_test_declarations_t *declarations, yyjson_val *record,
106 cbm_test_declaration_t *item) {

Callers 1

td_recordFunction · 0.85

Calls 2

td_argumentFunction · 0.85
cbm_arena_allocFunction · 0.50

Tested by

no test coverage detected