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

Function test_append_empty

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

Source from the content-addressed store, hash-verified

110/* AUTOGENERATED MOCKS END */
111
112static void test_append_empty(void)
113{
114 int *arr = tal_arr(NULL, int, 0);
115 int one[] = { 1, 2, 3 };
116
117 tal_arr_append(&arr, tal_dup_arr(arr, int, one, ARRAY_SIZE(one), 0));
118
119 assert(tal_count(arr) == 3);
120 assert(arr[0] == 1);
121 assert(arr[1] == 2);
122 assert(arr[2] == 3);
123
124 tal_free(arr);
125}
126
127static void test_append_nonempty(void)
128{

Callers 1

mainFunction · 0.85

Calls 1

tal_freeFunction · 0.85

Tested by

no test coverage detected