4 static int test_isds_pki_credentials_free(
5 struct isds_pki_credentials
**credentials
) {
6 isds_pki_credentials_free(credentials
);
7 if (!credentials
) PASS_TEST
;
10 FAIL_TEST("isds_pki_credentials_free() did not null pointer");
16 int main(int argc
, char **argv
) {
18 INIT_TEST("isds_pki_credentials_free()");
20 ABORT_UNIT("isds_init() failed");
22 struct isds_pki_credentials
*credentials
= NULL
;
23 TEST("NULL", test_isds_pki_credentials_free
, NULL
);
24 TEST("*NULL", test_isds_pki_credentials_free
, &credentials
);
26 TEST_CALLOC(credentials
);
27 TEST("Empty structure", test_isds_pki_credentials_free
, &credentials
);
29 TEST_CALLOC(credentials
);
30 TEST_FILL_STRING(credentials
->engine
);
31 TEST_FILL_STRING(credentials
->certificate
);
32 TEST_FILL_STRING(credentials
->key
);
33 TEST_FILL_STRING(credentials
->passphrase
)
34 TEST("Full structure", test_isds_pki_credentials_free
, &credentials
);