tests: Adapt utf8locale to musl
[libisds.git] / test / offline / isds_fulltext_result_free.c
blobc37e910903246042bc55ea5de2cf73899cf85aaa
1 #include "../test.h"
2 #include "isds.h"
4 static int test_isds_fulltext_result_free(
5 struct isds_fulltext_result **result) {
6 isds_fulltext_result_free(result);
7 if (NULL == result) PASS_TEST;
9 if (NULL != *result)
10 FAIL_TEST("isds_fulltext_result_free() did not null pointer");
12 PASS_TEST;
16 int main(void) {
18 INIT_TEST("isds_fulltext_result_free()");
19 if (isds_init())
20 ABORT_UNIT("isds_init() failed");
22 struct isds_fulltext_result *result = NULL;
23 TEST("NULL", test_isds_fulltext_result_free, NULL);
24 TEST("*NULL", test_isds_fulltext_result_free, &result);
26 TEST_CALLOC(result);
27 TEST("Empty structure", test_isds_fulltext_result_free, &result);
29 TEST_CALLOC(result);
30 TEST_FILL_STRING(result->dbID);
31 TEST_FILL_STRING(result->name);
32 TEST_CALLOC(result->name_match_start);
33 TEST_CALLOC(result->name_match_end);
34 TEST_FILL_STRING(result->address);
35 TEST_CALLOC(result->address_match_start);
36 TEST_CALLOC(result->address_match_end);
37 TEST_FILL_STRING(result->ic);
38 TEST_CALLOC(result->biDate);
39 TEST("Full structure", test_isds_fulltext_result_free, &result);
41 isds_cleanup();
42 SUM_TEST();