mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
add FLAC__metadata_get_tags(), FLAC::Metadata::get_tags()
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user