test/test_list.c

changeset 443
d6d8712e15bc
parent 442
310019ddfe4e
child 444
cb944fa1852a
equal deleted inserted replaced
442:310019ddfe4e 443:d6d8712e15bc
171 if (CUE_SUCCESS != CU_initialize_registry()) { 171 if (CUE_SUCCESS != CU_initialize_registry()) {
172 return CU_get_error(); 172 return CU_get_error();
173 } 173 }
174 174
175 suite = CU_add_suite("linked list suite", NULL, NULL); 175 suite = CU_add_suite("linked list suite", NULL, NULL);
176 if (NULL == suite) { 176
177 CU_cleanup_registry(); 177 CU_add_test(suite, "linked list: create and destroy", test_linked_list_create);
178 return CU_get_error(); 178 CU_add_test(suite, "linked list: get node at index", test_linked_list_at);
179 } 179 CU_add_test(suite, "linked list: add", test_cx_linked_list_add);
180
181 if (
182 !CU_add_test(suite, "linked list: create and destroy", test_linked_list_create) ||
183 !CU_add_test(suite, "linked list: get node at index", test_linked_list_at) ||
184 !CU_add_test(suite, "linked list: add", test_cx_linked_list_add)
185 ) {
186 CU_cleanup_registry();
187 return CU_get_error();
188 }
189
190 suite = CU_add_suite("array suite", NULL, NULL);
191 if (NULL == suite) {
192 CU_cleanup_registry();
193 return CU_get_error();
194 }
195
196 /*
197 if (
198 !CU_add_test(suite, "array...", test_array...)
199 ) {
200 CU_cleanup_registry();
201 return CU_get_error();
202 }
203 */
204 180
205 CU_basic_set_mode(UCX_CU_BRM); 181 CU_basic_set_mode(UCX_CU_BRM);
206 182
207 int exitcode; 183 int exitcode;
208 if (CU_basic_run_tests()) { 184 if (CU_basic_run_tests()) {

mercurial