From 319e60d31b30c59868edc0bee8688ba4f40fdb80 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Wed, 1 Jul 2020 16:37:30 +0200 Subject: Testfälle besser dokumentiert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- csv-test.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'csv-test.c') diff --git a/csv-test.c b/csv-test.c index 99325af..c5152ea 100644 --- a/csv-test.c +++ b/csv-test.c @@ -17,7 +17,7 @@ f = NULL void -test1(void) +test_line_endings1(void) { FILE *f; csv_t csv = { 0 }; @@ -45,7 +45,7 @@ test1(void) } void -test2(void) +test_line_endings2(void) { FILE *f; csv_t csv = { 0 }; @@ -73,7 +73,7 @@ test2(void) } void -test3(void) +test_empty_fields(void) { FILE *f; csv_t csv = { 0 }; @@ -222,7 +222,7 @@ test3(void) } void -test4(void) +test_simple_fields(void) { FILE *f; csv_t csv = { 0 }; @@ -371,7 +371,7 @@ test4(void) } void -test5(void) +test_quoted_fields(void) { FILE *f; csv_t csv = { 0 }; @@ -394,7 +394,7 @@ test5(void) } void -test6(void) +test_wrong_quoted_field(void) { FILE *f; csv_t csv = { 0 }; @@ -419,7 +419,7 @@ cb_error(csv_err_t err, void *cb_arg) } void -error1(void) +test_out_of_range_error(void) { jmp_buf env; csv_options_t csv_options = csv_default_options; @@ -455,7 +455,7 @@ error1(void) } void -error2(void) +test_read_error(void) { jmp_buf env; csv_options_t csv_options = csv_default_options; @@ -526,7 +526,7 @@ my_free(void *ptr, size_t n, size_t sz, void *cb_arg) } void -memory_fail1(void) +test_allocation_error1(void) { jmp_buf env; @@ -566,17 +566,17 @@ memory_fail1(void) int main(void) { - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); + test_line_endings1(); + test_line_endings2(); + test_empty_fields(); + test_simple_fields(); + test_quoted_fields(); + test_wrong_quoted_field(); - error1(); - error2(); + test_out_of_range_error(); + test_read_error(); - memory_fail1(); + test_allocation_error1(); return EXIT_SUCCESS; } -- cgit v1.3