add FLAC__metadata_get_tags(), FLAC::Metadata::get_tags()

This commit is contained in:
Josh Coalson
2004-07-30 01:54:29 +00:00
parent 9645dddaad
commit 1aca6b114b
7 changed files with 164 additions and 18 deletions

View File

@@ -591,6 +591,7 @@ static bool remove_file_(const char *filename)
static bool test_level_0_()
{
FLAC::Metadata::StreamInfo streaminfo;
FLAC::Metadata::VorbisComment *tags = 0;
printf("\n\n++++++ testing level 0 interface\n");
@@ -600,6 +601,8 @@ static bool test_level_0_()
if(!test_file_(flacfile_, /*ignore_metadata=*/true))
return false;
printf("testing FLAC::Metadata::get_streaminfo()... ");
if(!FLAC::Metadata::get_streaminfo(flacfile_, streaminfo))
return die_("during FLAC::Metadata::get_streaminfo()");
@@ -615,6 +618,21 @@ static bool test_level_0_()
if(streaminfo.get_max_blocksize() != 576)
return die_("mismatch in streaminfo.get_max_blocksize()");
printf("OK\n");
printf("testing FLAC::Metadata::get_tags()... ");
if(!FLAC::Metadata::get_tags(flacfile_, tags))
return die_("during FLAC::Metadata::get_tags()");
/* check to see if some basic data matches (c.f. generate_file_()) */
if(tags->get_num_comments() != 0)
return die_("mismatch in tags->get_num_comments()");
printf("OK\n");
delete tags;
if(!remove_file_(flacfile_))
return false;