test: Fix indentation
[libisds.git] / test / offline / isds_event_free.c
blobf0232efde3c83314db91348215c73c699fce268c
1 #include "../test.h"
2 #include "isds.h"
4 static int test_isds_event_free(
5 struct isds_event **event) {
6 isds_event_free(event);
7 if (!event) PASS_TEST;
9 if (*event)
10 FAIL_TEST("isds_event_free() did not null pointer");
12 PASS_TEST;
16 int main(void) {
18 INIT_TEST("isds_event_free()");
19 if (isds_init())
20 ABORT_UNIT("isds_init() failed");
22 struct isds_event *event = NULL;
23 TEST("NULL", test_isds_event_free, NULL);
24 TEST("*NULL", test_isds_event_free, &event);
26 TEST_CALLOC(event);
27 TEST("Empty structure", test_isds_event_free, &event);
29 TEST_CALLOC(event);
30 TEST_CALLOC(event->time); /* When the event occurred */
31 TEST_FILL_INT(event->type);
32 TEST_FILL_STRING(event->description);
33 TEST("Full structure", test_isds_event_free, &event);
35 isds_cleanup();
36 SUM_TEST();