diff --git a/tests/check_file_t.c b/tests/check_file_t.c index 6ecd970..20d7fa2 100644 --- a/tests/check_file_t.c +++ b/tests/check_file_t.c @@ -4,25 +4,27 @@ START_TEST(test_file_init) { file_t *f; - exception_t *e = NULL; + exception_t *e = exception_init(); f = file_init ("samples/1.txt", FILEPATH_RELATIVE, e); ck_assert_ptr_nonnull (f); - ck_assert_ptr_null (e); + ck_assert (exception_null(e)); file_close (f); + exception_free(e); } END_TEST START_TEST(test_file_md5) { file_t *f; - exception_t *e = NULL; + exception_t *e = exception_init(); f = file_init("samples/1.txt", FILEPATH_RELATIVE, e); file_md5_gen (f, e); - ck_assert_ptr_null (e); + ck_assert (exception_null(e)); file_md5_str (f, e); - ck_assert_ptr_null (e); + ck_assert (exception_null(e)); ck_assert_str_eq (f->hash_str, "492ff087b26577237c576e7ad409064e"); file_close (f); + exception_free(e); } Suite*