4 static int test_create(struct isds_ctx
**context
) {
6 FAIL_TEST("Bad invocation");
8 *context
= isds_ctx_create();
10 FAIL_TEST("isds_ctx_create() failed");
15 static int test_free(const isds_error error
, struct isds_ctx
**context
) {
17 FAIL_TEST("Bad invocation");
19 if (error
!= isds_ctx_free(context
))
20 FAIL_TEST("Wrong return code");
23 FAIL_TEST("context not NULLed");
29 int main(int argc
, char **argv
) {
32 struct isds_ctx
*context
= NULL
;
35 ABORT_UNIT("isds_init() failed\n");
37 TEST("create", test_create
, &context
);
38 TEST("free valid context", test_free
, IE_SUCCESS
, &context
);
41 TEST("free invalid context", test_free
, IE_INVALID_CONTEXT
, &context
);