5 static int test_isds_PersonName_duplicate(struct isds_PersonName
*origin
) {
6 struct isds_PersonName
*copy
= isds_PersonName_duplicate(origin
);
7 TEST_DESTRUCTOR((void(*)(void *))isds_PersonName_free
, ©
);
11 FAIL_TEST("Duplicate of NULL should be NULL");
16 FAIL_TEST("isds_PersonName_duplicate() returned NULL instead of "
19 TEST_STRING_DUPLICITY(origin
->pnFirstName
, copy
->pnFirstName
);
20 TEST_STRING_DUPLICITY(origin
->pnMiddleName
, copy
->pnMiddleName
);
21 TEST_STRING_DUPLICITY(origin
->pnLastName
, copy
->pnLastName
);
22 TEST_STRING_DUPLICITY(origin
->pnLastNameAtBirth
, copy
->pnLastNameAtBirth
);
30 INIT_TEST("isds_PersonName_duplicate()");
32 ABORT_UNIT("isds_init() failed");
34 TEST("NULL", test_isds_PersonName_duplicate
, NULL
);
36 struct isds_PersonName empty
;
37 memset(&empty
, 0, sizeof(empty
));
38 TEST("Empty structure", test_isds_PersonName_duplicate
, &empty
);
41 struct isds_PersonName full
= {
45 .pnLastNameAtBirth
= "4"
48 TEST("Full structure", test_isds_PersonName_duplicate
, &full
);