4 static int test_isds_Address_duplicate(struct isds_Address
*origin
) {
5 struct isds_Address
*copy
= isds_Address_duplicate(origin
);
9 FAIL_TEST("Duplicate of NULL should be NULL");
14 FAIL_TEST("isds_Address_duplicate() returned NULL instead of "
17 TEST_STRING_DUPLICITY(origin
->adCity
, copy
->adCity
);
18 TEST_STRING_DUPLICITY(origin
->adStreet
, copy
->adStreet
);
19 TEST_STRING_DUPLICITY(origin
->adNumberInStreet
, copy
->adNumberInStreet
);
20 TEST_STRING_DUPLICITY(origin
->adNumberInMunicipality
,
21 copy
->adNumberInMunicipality
);
22 TEST_STRING_DUPLICITY(origin
->adZipCode
, copy
->adZipCode
);
23 TEST_STRING_DUPLICITY(origin
->adState
, copy
->adState
);
29 int main(int argc
, char **argv
) {
31 INIT_TEST("isds_Address_duplicate()");
33 ABORT_UNIT("isds_init() failed");
35 TEST("NULL", test_isds_Address_duplicate
, NULL
);
37 struct isds_Address
*empty
;
39 TEST("Empty structure", test_isds_Address_duplicate
, empty
);
42 struct isds_Address full
= {
45 .adNumberInStreet
= "3",
46 .adNumberInMunicipality
= "4",
51 TEST("Full structure", test_isds_Address_duplicate
, &full
);