Update comment at isds_get_box_list_archive()
[libisds.git] / test / offline / isds_commercial_permission_free.c
blob84a906514bd815771b0e8cd334deb2097cb17da0
1 #include "../test.h"
2 #include "isds.h"
4 static int test_isds_commercial_permission_free(
5 struct isds_commercial_permission **permission) {
6 isds_commercial_permission_free(permission);
7 if (!permission) PASS_TEST;
9 if (*permission)
10 FAIL_TEST("isds_commercial_permission_free() did not null pointer");
12 PASS_TEST;
16 int main(void) {
17 INIT_TEST("isds_commercial_permission_free()");
18 if (isds_init())
19 ABORT_UNIT("isds_init() failed");
21 struct isds_commercial_permission *permission = NULL;
22 TEST("NULL", test_isds_commercial_permission_free, NULL);
23 TEST("*NULL", test_isds_commercial_permission_free, &permission);
25 TEST_CALLOC(permission);
26 TEST("Empty structure", test_isds_commercial_permission_free, &permission);
28 TEST_CALLOC(permission);
29 TEST_FILL_STRING(permission->recipient);
30 TEST_FILL_STRING(permission->payer);
31 TEST_CALLOC(permission->expiration);
32 TEST_FILL_INT(permission->count);
33 TEST_FILL_STRING(permission->reply_identifier);
34 TEST("Full structure", test_isds_commercial_permission_free, &permission);
36 isds_cleanup();
37 SUM_TEST();