l10n: Update translation catalogues
[libisds.git] / test / offline / isds_DbUserInfo_free.c
blobb51dd8761dec83d05364814713f420c033f57c09
1 #include "../test.h"
2 #include "isds.h"
4 static int test_isds_DbUserInfo_free(
5 struct isds_DbUserInfo **DbUserInfo) {
6 isds_DbUserInfo_free(DbUserInfo);
7 if (!DbUserInfo) PASS_TEST;
9 if (*DbUserInfo)
10 FAIL_TEST("isds_DbUserInfo_free() did not null pointer");
12 PASS_TEST;
16 int main(void) {
18 INIT_TEST("isds_DbUserInfo_free()");
19 if (isds_init())
20 ABORT_UNIT("isds_init() failed");
22 struct isds_DbUserInfo *DbUserInfo = NULL;
23 TEST("NULL", test_isds_DbUserInfo_free, NULL);
24 TEST("*NULL", test_isds_DbUserInfo_free, &DbUserInfo);
26 TEST_CALLOC(DbUserInfo);
27 TEST("Empty structure", test_isds_DbUserInfo_free, &DbUserInfo);
29 /* Full structure */
30 TEST_CALLOC(DbUserInfo);
31 TEST_FILL_STRING(DbUserInfo->userID);
32 TEST_FILL_INT(DbUserInfo->userType)
33 TEST_FILL_INT(DbUserInfo->userPrivils);
35 TEST_CALLOC(DbUserInfo->personName); /* Name of the person */
36 TEST_FILL_STRING(DbUserInfo->personName->pnFirstName);
37 TEST_FILL_STRING(DbUserInfo->personName->pnMiddleName);
38 TEST_FILL_STRING(DbUserInfo->personName->pnLastName);
39 TEST_FILL_STRING(DbUserInfo->personName->pnLastNameAtBirth);
41 TEST_CALLOC(DbUserInfo->address); /* Post address */
42 TEST_FILL_STRING(DbUserInfo->address->adCity);
43 TEST_FILL_STRING(DbUserInfo->address->adStreet);
44 TEST_FILL_STRING(DbUserInfo->address->adNumberInStreet);
45 TEST_FILL_STRING(DbUserInfo->address->adNumberInMunicipality);
46 TEST_FILL_STRING(DbUserInfo->address->adZipCode);
47 TEST_FILL_STRING(DbUserInfo->address->adState);
49 TEST_CALLOC(DbUserInfo->biDate); /* Date of birth in local time */
50 TEST_FILL_STRING(DbUserInfo->ic);
51 TEST_FILL_STRING(DbUserInfo->firmName);
52 TEST_FILL_STRING(DbUserInfo->caStreet);
53 TEST_FILL_STRING(DbUserInfo->caCity);
54 TEST_FILL_STRING(DbUserInfo->caZipCode);
55 TEST_FILL_STRING(DbUserInfo->caState);
56 TEST("Full structure", test_isds_DbUserInfo_free, &DbUserInfo);
58 isds_cleanup();
59 SUM_TEST();