[A] Added one more test for errors
This commit is contained in:
parent
df2cae2706
commit
1ba5d2ae02
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user