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

Function test_appendn_partial

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

Source from the content-addressed store, hash-verified

144}
145
146static void test_appendn_partial(void)
147{
148 int *arr = tal_arr(NULL, int, 1);
149 arr[0] = 5;
150
151 int more[] = { 6, 7, 8, 9 };
152
153 tal_arr_appendn(&arr, more, 2);
154
155 assert(tal_count(arr) == 3);
156 assert(arr[0] == 5);
157 assert(arr[1] == 6);
158 assert(arr[2] == 7);
159
160 tal_free(arr);
161}
162
163static void test_appendn_zero(void)
164{

Callers 1

mainFunction · 0.85

Calls 1

tal_freeFunction · 0.85

Tested by

no test coverage detected