diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | tests/headerless_test.c | 4 | ||||
-rw-r--r-- | tests/lossy_comp_test.c | 8 |
3 files changed, 14 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2008-04-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com> + + * tests/*.c + Add calls to sf_close() where needed. + 2008-04-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com> * src/test_* diff --git a/tests/headerless_test.c b/tests/headerless_test.c index 21e056b..6c3cd0e 100644 --- a/tests/headerless_test.c +++ b/tests/headerless_test.c @@ -104,6 +104,8 @@ headerless_test (const char * filename, int format, int expected) check_log_buffer_or_die (file, __LINE__) ; + sf_close (file) ; + printf ("ok\n") ; unlink (filename) ; } /* headerless_test */ @@ -174,6 +176,8 @@ old_test (void) exit (1) ; } ; + sf_close (file) ; + printf ("ok\n") ; unlink (filename) ; } /* old_test */ diff --git a/tests/lossy_comp_test.c b/tests/lossy_comp_test.c index 0443f7c..1d7c4ed 100644 --- a/tests/lossy_comp_test.c +++ b/tests/lossy_comp_test.c @@ -1350,7 +1350,7 @@ channels = 1 ; */ if ((file = sf_open (filename, SFM_WRITE, &sfinfo)) == NULL) { const char * errstr ; - + errstr = sf_strerror (NULL) ; if (strstr (errstr, "Sample rate chosen is known to trigger a Vorbis") == NULL) { printf ("Line %d: sf_open_fd (SFM_WRITE) failed : %s\n", __LINE__, errstr) ; @@ -1558,7 +1558,7 @@ channels = 1 ; */ if ((file = sf_open (filename, SFM_WRITE, &sfinfo)) == NULL) { const char * errstr ; - + errstr = sf_strerror (NULL) ; if (strstr (errstr, "Sample rate chosen is known to trigger a Vorbis") == NULL) { printf ("Line %d: sf_open_fd (SFM_WRITE) failed : %s\n", __LINE__, errstr) ; @@ -2183,7 +2183,9 @@ read_raw_test (const char *filename, int filetype, int channels) { printf ("\nLine %d : sf_read_raw returned %ld should be %ld\n", __LINE__, SF_COUNT_TO_LONG (count), sfinfo.channels * SF_COUNT_TO_LONG (sfinfo.frames)) ; exit (1) ; } ; - + + sf_close (file) ; + unlink (filename) ; printf ("ok\n") ; } /* read_raw_test */ |