[C] Changed codes of errors

This commit is contained in:
seleznevae
2020-02-08 13:04:08 +03:00
parent 58a63f90f2
commit 1b42320163
11 changed files with 65 additions and 63 deletions

View File

@@ -6,6 +6,7 @@ void test_error_codes(void)
{
// Nonnegative code is success
{
assert_str_equal(ft_strerror(FT_SUCCESS), "Libfort success");
assert_str_equal(ft_strerror(0), "Libfort success");
assert_str_equal(ft_strerror(1), "Libfort success");
assert_str_equal(ft_strerror(2), "Libfort success");
@@ -16,9 +17,9 @@ void test_error_codes(void)
// Error codes
{
assert_str_equal(ft_strerror(FT_MEMORY_ERROR), "Libfort error (out of memory)");
assert_str_equal(ft_strerror(FT_ERROR), "Libfort error (general error)");
assert_str_equal(ft_strerror(FT_EINVAL), "Libfort error (invalid argument)");
assert_str_equal(ft_strerror(FT_INTERN_ERROR), "Libfort error (internal logic error)");
assert_str_equal(ft_strerror(FT_GEN_ERROR), "Libfort error (general error)");
assert_str_equal(ft_strerror(-42), "Libfort unknown error");
assert_str_equal(ft_strerror(-666), "Libfort unknown error");