Move print test suite to read test suite

This commit is contained in:
Pradana AUMARS 2021-06-29 23:42:33 +02:00
parent 9d1dcc5714
commit 47095a868e
1 changed files with 11 additions and 18 deletions

View File

@ -71,22 +71,6 @@ START_TEST(test_easycsv_printrows)
easycsv_free(csv);
}
Suite*
easycsv_print_suite(void)
{
Suite *s;
TCase *tc_col, *tc_row;
s = suite_create ("print");
tc_col = tcase_create ("columns");
tc_row = tcase_create ("rows");
tcase_add_test(tc_col, test_easycsv_printcolumns);
tcase_add_test(tc_row, test_easycsv_printrows);
suite_add_tcase(s, tc_col);
suite_add_tcase(s, tc_row);
return s;
}
START_TEST(test_easycsv_readcolumnvalue)
{
easycsv *csv = easycsv_init(SAMPLE1_PATH, EASYCSV_R);
@ -101,11 +85,21 @@ Suite*
easycsv_read_suite(void)
{
Suite *s;
TCase *tc_readcolumnvalue;
TCase *tc_readcolumnvalue, *tc_col, *tc_row;
s = suite_create ("read");
tc_readcolumnvalue = tcase_create ("readcolumnvalue");
tcase_add_test(tc_readcolumnvalue, test_easycsv_readcolumnvalue);
tc_col = tcase_create ("columns");
tcase_add_test(tc_col, test_easycsv_printcolumns);
tc_row = tcase_create ("rows");
tcase_add_test(tc_row, test_easycsv_printrows);
suite_add_tcase(s, tc_readcolumnvalue);
suite_add_tcase(s, tc_col);
suite_add_tcase(s, tc_row);
return s;
}
@ -116,7 +110,6 @@ main(void)
SRunner *sr;
sr = srunner_create(easycsv_constructor_suite());
srunner_add_suite(sr, easycsv_print_suite());
srunner_add_suite(sr, easycsv_read_suite());
srunner_run_all(sr, CK_VERBOSE);