test: server can require client certificate in TLS handshake
[libisds.git] / test / offline / isds_approval_free.c
blob4a4f0542dcb0646b04d32c99dde22b1e39a1f122
1 #include "../test.h"
2 #include "isds.h"
4 static int test_isds_approval_free(struct isds_approval **approval) {
5 isds_approval_free(approval);
6 if (!approval) PASS_TEST;
8 if (*approval)
9 FAIL_TEST("isds_approval_free() did not null pointer");
11 PASS_TEST;
15 int main(int argc, char **argv) {
17 INIT_TEST("isds_approval_free()");
18 if (isds_init())
19 ABORT_UNIT("isds_init() failed");
21 struct isds_approval *approval = NULL;
23 TEST("NULL", test_isds_approval_free, NULL);
24 TEST("*NULL", test_isds_approval_free, &approval);
26 TEST_CALLOC(approval);
27 TEST("Empty structure", test_isds_approval_free, &approval);
29 TEST_CALLOC(approval);
30 TEST_FILL_STRING(approval->refference);
31 TEST("Full structure", test_isds_approval_free, &approval);
33 isds_cleanup();
34 SUM_TEST();