aboutsummaryrefslogtreecommitdiff
path: root/csv-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'csv-test.c')
-rw-r--r--csv-test.c36
1 files changed, 18 insertions, 18 deletions
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 @@
17 f = NULL 17 f = NULL
18 18
19void 19void
20test1(void) 20test_line_endings1(void)
21{ 21{
22 FILE *f; 22 FILE *f;
23 csv_t csv = { 0 }; 23 csv_t csv = { 0 };
@@ -45,7 +45,7 @@ test1(void)
45} 45}
46 46
47void 47void
48test2(void) 48test_line_endings2(void)
49{ 49{
50 FILE *f; 50 FILE *f;
51 csv_t csv = { 0 }; 51 csv_t csv = { 0 };
@@ -73,7 +73,7 @@ test2(void)
73} 73}
74 74
75void 75void
76test3(void) 76test_empty_fields(void)
77{ 77{
78 FILE *f; 78 FILE *f;
79 csv_t csv = { 0 }; 79 csv_t csv = { 0 };
@@ -222,7 +222,7 @@ test3(void)
222} 222}
223 223
224void 224void
225test4(void) 225test_simple_fields(void)
226{ 226{
227 FILE *f; 227 FILE *f;
228 csv_t csv = { 0 }; 228 csv_t csv = { 0 };
@@ -371,7 +371,7 @@ test4(void)
371} 371}
372 372
373void 373void
374test5(void) 374test_quoted_fields(void)
375{ 375{
376 FILE *f; 376 FILE *f;
377 csv_t csv = { 0 }; 377 csv_t csv = { 0 };
@@ -394,7 +394,7 @@ test5(void)
394} 394}
395 395
396void 396void
397test6(void) 397test_wrong_quoted_field(void)
398{ 398{
399 FILE *f; 399 FILE *f;
400 csv_t csv = { 0 }; 400 csv_t csv = { 0 };
@@ -419,7 +419,7 @@ cb_error(csv_err_t err, void *cb_arg)
419} 419}
420 420
421void 421void
422error1(void) 422test_out_of_range_error(void)
423{ 423{
424 jmp_buf env; 424 jmp_buf env;
425 csv_options_t csv_options = csv_default_options; 425 csv_options_t csv_options = csv_default_options;
@@ -455,7 +455,7 @@ error1(void)
455} 455}
456 456
457void 457void
458error2(void) 458test_read_error(void)
459{ 459{
460 jmp_buf env; 460 jmp_buf env;
461 csv_options_t csv_options = csv_default_options; 461 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)
526} 526}
527 527
528void 528void
529memory_fail1(void) 529test_allocation_error1(void)
530{ 530{
531 jmp_buf env; 531 jmp_buf env;
532 532
@@ -566,17 +566,17 @@ memory_fail1(void)
566int 566int
567main(void) 567main(void)
568{ 568{
569 test1(); 569 test_line_endings1();
570 test2(); 570 test_line_endings2();
571 test3(); 571 test_empty_fields();
572 test4(); 572 test_simple_fields();
573 test5(); 573 test_quoted_fields();
574 test6(); 574 test_wrong_quoted_field();
575 575
576 error1(); 576 test_out_of_range_error();
577 error2(); 577 test_read_error();
578 578
579 memory_fail1(); 579 test_allocation_error1();
580 580
581 return EXIT_SUCCESS; 581 return EXIT_SUCCESS;
582} 582}