Browse Source

Move print test suite to read test suite

redesign
Pradana AUMARS 11 months ago
parent
commit
47095a868e
  1. 29
      tests/check_easycsv.c

29
tests/check_easycsv.c

@ -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,10 +85,20 @@ 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);

Loading…
Cancel
Save