Commit a196a663 authored by Josh Coalson's avatar Josh Coalson

fix bug where test would fail if libFLAC not built with ogg support

parent 2beca730
......@@ -2192,15 +2192,17 @@ bool test_metadata_file_manipulation()
if(!test_level_2_misc_(/*is_ogg=*/false))
return false;
if(!test_level_2_(/*filename_based=*/true, /*is_ogg=*/true)) /* filename-based */
return false;
if(!test_level_2_(/*filename_based=*/false, /*is_ogg=*/true)) /* callback-based */
return false;
if(FLAC_API_SUPPORTS_OGG_FLAC) {
if(!test_level_2_(/*filename_based=*/true, /*is_ogg=*/true)) /* filename-based */
return false;
if(!test_level_2_(/*filename_based=*/false, /*is_ogg=*/true)) /* callback-based */
return false;
#if 0
/* when ogg flac write is supported, will have to add this: */
if(!test_level_2_misc_(/*is_ogg=*/true))
return false;
/* when ogg flac write is supported, will have to add this: */
if(!test_level_2_misc_(/*is_ogg=*/true))
return false;
#endif
}
return true;
}
......@@ -22,6 +22,7 @@
#include <stdio.h>
#include <stdlib.h> /* for malloc() */
#include <string.h> /* for memcpy()/memset() */
#if defined _MSC_VER || defined __MINGW32__
#include <sys/utime.h> /* for utime() */
#include <io.h> /* for chmod() */
......@@ -2111,15 +2112,17 @@ FLAC__bool test_metadata_file_manipulation()
if(!test_level_2_misc_(/*is_ogg=*/false))
return false;
if(!test_level_2_(/*filename_based=*/true, /*is_ogg=*/true)) /* filename-based */
return false;
if(!test_level_2_(/*filename_based=*/false, /*is_ogg=*/true)) /* callback-based */
return false;
if(FLAC_API_SUPPORTS_OGG_FLAC) {
if(!test_level_2_(/*filename_based=*/true, /*is_ogg=*/true)) /* filename-based */
return false;
if(!test_level_2_(/*filename_based=*/false, /*is_ogg=*/true)) /* callback-based */
return false;
#if 0
/* when ogg flac write is supported, will have to add this: */
if(!test_level_2_misc_(/*is_ogg=*/true))
return false;
/* when ogg flac write is supported, will have to add this: */
if(!test_level_2_misc_(/*is_ogg=*/true))
return false;
#endif
}
return true;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment