From 1ba5d2ae02fdc53c8ce049942d02e9db32d87e3f Mon Sep 17 00:00:00 2001 From: seleznevae Date: Sat, 22 Dec 2018 12:30:26 +0300 Subject: [PATCH] [A] Added one more test for errors --- tests/bb_tests/test_memory_errors.c | 13 +++++++++++-- tests/bb_tests/test_table_properties.c | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/bb_tests/test_memory_errors.c b/tests/bb_tests/test_memory_errors.c index c74c745..43740b7 100644 --- a/tests/bb_tests/test_memory_errors.c +++ b/tests/bb_tests/test_memory_errors.c @@ -57,9 +57,14 @@ static int create_table_and_show(void) goto exit; } + if (ft_printf_ln(table, "%d|%c|%d|%f", 3, 'c', 234, 3.140000) != 4) { + result = 7; + goto exit; + } + const char *table_str = ft_to_string(table); if (table_str == NULL) { - result = 7; + result = 8; goto exit; } const char *table_str_etalon = @@ -75,10 +80,14 @@ static int create_table_and_show(void) "| | | | |\n" "| 3 | c | 234 | 3.140000 |\n" "| | | | |\n" + "+---+---+-----+----------+\n" + "| | | | |\n" + "| 3 | c | 234 | 3.140000 |\n" + "| | | | |\n" "+---+---+-----+----------+\n"; /*assert_str_equal(table_str, table_str_etalon);*/ if (strcmp(table_str, table_str_etalon) != 0) { - result = 8; + result = 9; goto exit; } diff --git a/tests/bb_tests/test_table_properties.c b/tests/bb_tests/test_table_properties.c index 6648170..666848c 100644 --- a/tests/bb_tests/test_table_properties.c +++ b/tests/bb_tests/test_table_properties.c @@ -614,7 +614,7 @@ void test_table_cell_properties(void) ft_destroy_table(table); } - WHEN("Cells with spans and with much text in them") { + WHEN("Cells with spans and with a lot of text in them") { set_test_properties_as_default(); table = ft_create_table();