MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_appendn_zero

Function test_appendn_zero

common/test/run-utils-tal_arr_append.c:163–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163static void test_appendn_zero(void)
164{
165 int *arr = tal_arr(NULL, int, 3);
166 arr[0] = 1;
167 arr[1] = 2;
168 arr[2] = 3;
169
170 int more[] = { 4, 5 };
171
172 tal_arr_appendn(&arr, more, 0);
173
174 assert(tal_count(arr) == 3);
175 assert(arr[0] == 1);
176 assert(arr[1] == 2);
177 assert(arr[2] == 3);
178
179 tal_free(arr);
180}
181
182static void test_append_structs(void)
183{

Callers 1

mainFunction · 0.85

Calls 1

tal_freeFunction · 0.85

Tested by

no test coverage detected