4 static int test_isds_PersonName_duplicate(struct isds_PersonName
*origin
) {
5 struct isds_PersonName
*copy
= isds_PersonName_duplicate(origin
);
9 FAIL_TEST("Duplicate of NULL should be NULL");
14 FAIL_TEST("isds_PersonName_duplicate() returned NULL instead of "
17 TEST_STRING_DUPLICITY(origin
->pnFirstName
, copy
->pnFirstName
);
18 TEST_STRING_DUPLICITY(origin
->pnMiddleName
, copy
->pnMiddleName
);
19 TEST_STRING_DUPLICITY(origin
->pnLastName
, copy
->pnLastName
);
20 TEST_STRING_DUPLICITY(origin
->pnLastNameAtBirth
, copy
->pnLastNameAtBirth
);
26 int main(int argc
, char **argv
) {
28 INIT_TEST("isds_PersonName_duplicate()");
30 ABORT_UNIT("isds_init() failed");
32 TEST("NULL", test_isds_PersonName_duplicate
, NULL
);
34 struct isds_PersonName
*empty
;
36 TEST("Empty structure", test_isds_PersonName_duplicate
, empty
);
39 struct isds_PersonName full
= {
43 .pnLastNameAtBirth
= "4"
46 TEST("Full structure", test_isds_PersonName_duplicate
, &full
);