5 static int test_isds_Address_duplicate(struct isds_Address
*origin
) {
6 struct isds_Address
*copy
= isds_Address_duplicate(origin
);
7 TEST_DESTRUCTOR((void(*)(void*))isds_Address_free
, (void *)©
);
11 FAIL_TEST("Duplicate of NULL should be NULL");
16 FAIL_TEST("isds_Address_duplicate() returned NULL instead of "
19 TEST_STRING_DUPLICITY(origin
->adCity
, copy
->adCity
);
20 TEST_STRING_DUPLICITY(origin
->adStreet
, copy
->adStreet
);
21 TEST_STRING_DUPLICITY(origin
->adNumberInStreet
, copy
->adNumberInStreet
);
22 TEST_STRING_DUPLICITY(origin
->adNumberInMunicipality
,
23 copy
->adNumberInMunicipality
);
24 TEST_STRING_DUPLICITY(origin
->adZipCode
, copy
->adZipCode
);
25 TEST_STRING_DUPLICITY(origin
->adState
, copy
->adState
);
33 INIT_TEST("isds_Address_duplicate()");
35 ABORT_UNIT("isds_init() failed");
37 TEST("NULL", test_isds_Address_duplicate
, NULL
);
39 struct isds_Address empty
;
40 memset(&empty
, 0, sizeof(empty
));
41 TEST("Empty structure", test_isds_Address_duplicate
, &empty
);
44 struct isds_Address full
= {
47 .adNumberInStreet
= "3",
48 .adNumberInMunicipality
= "4",
53 TEST("Full structure", test_isds_Address_duplicate
, &full
);