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_INTPTR_DUPLICITY(origin
->adCode
, copy
->adCode
);
20 TEST_STRING_DUPLICITY(origin
->adCity
, copy
->adCity
);
21 TEST_STRING_DUPLICITY(origin
->adDistrict
, copy
->adDistrict
);
22 TEST_STRING_DUPLICITY(origin
->adStreet
, copy
->adStreet
);
23 TEST_STRING_DUPLICITY(origin
->adNumberInStreet
, copy
->adNumberInStreet
);
24 TEST_STRING_DUPLICITY(origin
->adNumberInMunicipality
,
25 copy
->adNumberInMunicipality
);
26 TEST_STRING_DUPLICITY(origin
->adZipCode
, copy
->adZipCode
);
27 TEST_STRING_DUPLICITY(origin
->adState
, copy
->adState
);
35 INIT_TEST("isds_Address_duplicate()");
37 ABORT_UNIT("isds_init() failed");
39 TEST("NULL", test_isds_Address_duplicate
, NULL
);
41 struct isds_Address empty
;
42 memset(&empty
, 0, sizeof(empty
));
43 TEST("Empty structure", test_isds_Address_duplicate
, &empty
);
47 struct isds_Address full
= {
52 .adNumberInStreet
= "5",
53 .adNumberInMunicipality
= "6",
58 TEST("Full structure", test_isds_Address_duplicate
, &full
);