diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-04-27 01:31:02 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-04-27 01:31:02 +0200 |
commit | 6153580a13e7e7c48e38fa446572c8adcae08084 (patch) | |
tree | 9be08616aed124c67159bf71fccd3a286bc0fe81 /tests/check_error.c | |
parent | c5e4f4c2d29831151bdce1802787b9cf012c3e5e (diff) | |
download | blogc-6153580a13e7e7c48e38fa446572c8adcae08084.tar.gz blogc-6153580a13e7e7c48e38fa446572c8adcae08084.tar.bz2 blogc-6153580a13e7e7c48e38fa446572c8adcae08084.zip |
Revert "*: use squareball error infrastructure"
This reverts commit a2b3551dfb9460470bd79f5648bf597c517c40d4.
Diffstat (limited to 'tests/check_error.c')
-rw-r--r-- | tests/check_error.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/check_error.c b/tests/check_error.c index 7fc3c3e..4effb08 100644 --- a/tests/check_error.c +++ b/tests/check_error.c @@ -22,22 +22,22 @@ static void test_error_new(void **state) { - sb_error_t *error = sb_error_new(1, "bola %s"); + blogc_error_t *error = blogc_error_new(1, "bola %s"); assert_non_null(error); - assert_int_equal(error->code, 1); + assert_int_equal(error->type, 1); assert_string_equal(error->msg, "bola %s"); - sb_error_free(error); + blogc_error_free(error); } static void test_error_new_printf(void **state) { - sb_error_t *error = sb_error_new_printf(2, "bola %s", "guda"); + blogc_error_t *error = blogc_error_new_printf(2, "bola %s", "guda"); assert_non_null(error); - assert_int_equal(error->code, 2); + assert_int_equal(error->type, 2); assert_string_equal(error->msg, "bola guda"); - sb_error_free(error); + blogc_error_free(error); } @@ -45,32 +45,32 @@ static void test_error_parser(void **state) { const char *a = "bola\nguda\nchunda\n"; - sb_error_t *error = blogc_error_parser(1, a, strlen(a), 11, "asd %d", 10); + blogc_error_t *error = blogc_error_parser(1, a, strlen(a), 11, "asd %d", 10); assert_non_null(error); - assert_int_equal(error->code, 1); + assert_int_equal(error->type, 1); assert_string_equal(error->msg, "asd 10\nError occurred near line 3, position 2: chunda"); - sb_error_free(error); + blogc_error_free(error); a = "bola\nguda\nchunda"; error = blogc_error_parser(1, a, strlen(a), 11, "asd %d", 10); assert_non_null(error); - assert_int_equal(error->code, 1); + assert_int_equal(error->type, 1); assert_string_equal(error->msg, "asd 10\nError occurred near line 3, position 2: chunda"); - sb_error_free(error); + blogc_error_free(error); a = "bola\nguda\nchunda"; error = blogc_error_parser(1, a, strlen(a), 0, "asd %d", 10); assert_non_null(error); - assert_int_equal(error->code, 1); + assert_int_equal(error->type, 1); assert_string_equal(error->msg, "asd 10\nError occurred near line 1, position 1: bola"); - sb_error_free(error); + blogc_error_free(error); a = ""; error = blogc_error_parser(1, a, strlen(a), 0, "asd %d", 10); assert_non_null(error); - assert_int_equal(error->code, 1); + assert_int_equal(error->type, 1); assert_string_equal(error->msg, "asd 10"); - sb_error_free(error); + blogc_error_free(error); } @@ -78,26 +78,26 @@ static void test_error_parser_crlf(void **state) { const char *a = "bola\r\nguda\r\nchunda\r\n"; - sb_error_t *error = blogc_error_parser(1, a, strlen(a), 13, "asd %d", 10); + blogc_error_t *error = blogc_error_parser(1, a, strlen(a), 13, "asd %d", 10); assert_non_null(error); - assert_int_equal(error->code, 1); + assert_int_equal(error->type, 1); assert_string_equal(error->msg, "asd 10\nError occurred near line 3, position 2: chunda"); - sb_error_free(error); + blogc_error_free(error); a = "bola\r\nguda\r\nchunda"; error = blogc_error_parser(1, a, strlen(a), 13, "asd %d", 10); assert_non_null(error); - assert_int_equal(error->code, 1); + assert_int_equal(error->type, 1); assert_string_equal(error->msg, "asd 10\nError occurred near line 3, position 2: chunda"); - sb_error_free(error); + blogc_error_free(error); a = "bola\r\nguda\r\nchunda"; error = blogc_error_parser(1, a, strlen(a), 0, "asd %d", 10); assert_non_null(error); - assert_int_equal(error->code, 1); + assert_int_equal(error->type, 1); assert_string_equal(error->msg, "asd 10\nError occurred near line 1, position 1: bola"); - sb_error_free(error); + blogc_error_free(error); } |