1
0
Fork 0

[A] Added one more test for errors

This commit is contained in:
seleznevae 2018-12-22 12:30:26 +03:00
parent df2cae2706
commit 1ba5d2ae02
2 changed files with 12 additions and 3 deletions

View File

@ -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;
}

View File

@ -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();