Update check_file_t to correctly check exception
This commit is contained in:
parent
72f71d4e2b
commit
0794691f5a
@ -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*
|
||||
|
Reference in New Issue
Block a user