Add support for serializing tdbPersonalOwnerInfo
[libisds.git] / test / offline / isds_approval_free.c
blob9f0285aeae5658222580de237704ed723c3f5e70
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(void) {
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();