4 static int test_isds_DbOwnerInfo_free(
5 struct isds_DbOwnerInfo
**DbOwnerInfo
) {
6 isds_DbOwnerInfo_free(DbOwnerInfo
);
7 if (!DbOwnerInfo
) PASS_TEST
;
10 FAIL_TEST("isds_DbOwnerInfo_free() did not null pointer");
18 INIT_TEST("isds_DbOwnerInfo_free()");
20 ABORT_UNIT("isds_init() failed");
22 struct isds_DbOwnerInfo
*DbOwnerInfo
= NULL
;
23 TEST("NULL", test_isds_DbOwnerInfo_free
, NULL
);
24 TEST("*NULL", test_isds_DbOwnerInfo_free
, &DbOwnerInfo
);
26 TEST_CALLOC(DbOwnerInfo
);
27 TEST("Empty structure", test_isds_DbOwnerInfo_free
, &DbOwnerInfo
);
31 TEST_CALLOC(DbOwnerInfo
);
32 TEST_FILL_STRING(DbOwnerInfo
->dbID
);
33 TEST_FILL_INT(DbOwnerInfo
->dbType
);
34 TEST_FILL_STRING(DbOwnerInfo
->ic
);
36 TEST_CALLOC(DbOwnerInfo
->personName
); /* Name of person */
37 TEST_FILL_STRING(DbOwnerInfo
->personName
->pnFirstName
);
38 TEST_FILL_STRING(DbOwnerInfo
->personName
->pnMiddleName
);
39 TEST_FILL_STRING(DbOwnerInfo
->personName
->pnLastName
);
40 TEST_FILL_STRING(DbOwnerInfo
->personName
->pnLastNameAtBirth
);
42 TEST_FILL_STRING(DbOwnerInfo
->firmName
);
44 TEST_CALLOC(DbOwnerInfo
->birthInfo
); /* Birth of person */
45 TEST_CALLOC(DbOwnerInfo
->birthInfo
->biDate
); /* Date of Birth */
46 TEST_FILL_STRING(DbOwnerInfo
->birthInfo
->biCity
);
47 TEST_FILL_STRING(DbOwnerInfo
->birthInfo
->biCounty
);
48 TEST_FILL_STRING(DbOwnerInfo
->birthInfo
->biState
);
50 TEST_CALLOC(DbOwnerInfo
->address
); /* Post address */
51 TEST_FILL_STRING(DbOwnerInfo
->address
->adCity
);
52 TEST_FILL_STRING(DbOwnerInfo
->address
->adStreet
);
53 TEST_FILL_STRING(DbOwnerInfo
->address
->adNumberInStreet
);
54 TEST_FILL_STRING(DbOwnerInfo
->address
->adNumberInMunicipality
);
55 TEST_FILL_STRING(DbOwnerInfo
->address
->adZipCode
);
56 TEST_FILL_STRING(DbOwnerInfo
->address
->adState
);
58 TEST_FILL_STRING(DbOwnerInfo
->nationality
);
59 TEST_FILL_STRING(DbOwnerInfo
->email
);
60 TEST_FILL_STRING(DbOwnerInfo
->telNumber
);
61 TEST_FILL_STRING(DbOwnerInfo
->identifier
);
62 TEST_FILL_STRING(DbOwnerInfo
->registryCode
);
63 TEST_FILL_INT(DbOwnerInfo
->dbState
);
64 TEST_FILL_INT(DbOwnerInfo
->dbEffectiveOVM
);
65 TEST_FILL_INT(DbOwnerInfo
->dbOpenAddressing
);
66 TEST("Full structure", test_isds_DbOwnerInfo_free
, &DbOwnerInfo
);