4 static int test_isds_DbUserInfo_free(
5 struct isds_DbUserInfo
**DbUserInfo
) {
6 isds_DbUserInfo_free(DbUserInfo
);
7 if (!DbUserInfo
) PASS_TEST
;
10 FAIL_TEST("isds_DbUserInfo_free() did not null pointer");
18 INIT_TEST("isds_DbUserInfo_free()");
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
);
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_FILL_STRING(DbUserInfo
->aifo_ticket
);
57 TEST("Full structure", test_isds_DbUserInfo_free
, &DbUserInfo
);