Move print test suite to read test suite
This commit is contained in:
parent
9d1dcc5714
commit
47095a868e
@ -71,22 +71,6 @@ START_TEST(test_easycsv_printrows)
|
|||||||
easycsv_free(csv);
|
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)
|
START_TEST(test_easycsv_readcolumnvalue)
|
||||||
{
|
{
|
||||||
easycsv *csv = easycsv_init(SAMPLE1_PATH, EASYCSV_R);
|
easycsv *csv = easycsv_init(SAMPLE1_PATH, EASYCSV_R);
|
||||||
@ -101,11 +85,21 @@ Suite*
|
|||||||
easycsv_read_suite(void)
|
easycsv_read_suite(void)
|
||||||
{
|
{
|
||||||
Suite *s;
|
Suite *s;
|
||||||
TCase *tc_readcolumnvalue;
|
TCase *tc_readcolumnvalue, *tc_col, *tc_row;
|
||||||
s = suite_create ("read");
|
s = suite_create ("read");
|
||||||
tc_readcolumnvalue = tcase_create ("readcolumnvalue");
|
tc_readcolumnvalue = tcase_create ("readcolumnvalue");
|
||||||
tcase_add_test(tc_readcolumnvalue, test_easycsv_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;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +110,6 @@ main(void)
|
|||||||
SRunner *sr;
|
SRunner *sr;
|
||||||
|
|
||||||
sr = srunner_create(easycsv_constructor_suite());
|
sr = srunner_create(easycsv_constructor_suite());
|
||||||
srunner_add_suite(sr, easycsv_print_suite());
|
|
||||||
srunner_add_suite(sr, easycsv_read_suite());
|
srunner_add_suite(sr, easycsv_read_suite());
|
||||||
|
|
||||||
srunner_run_all(sr, CK_VERBOSE);
|
srunner_run_all(sr, CK_VERBOSE);
|
||||||
|
Loading…
Reference in New Issue
Block a user