mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
add test for new form of get_tags()
This commit is contained in:
@@ -591,7 +591,6 @@ static bool remove_file_(const char *filename)
|
|||||||
static bool test_level_0_()
|
static bool test_level_0_()
|
||||||
{
|
{
|
||||||
FLAC::Metadata::StreamInfo streaminfo;
|
FLAC::Metadata::StreamInfo streaminfo;
|
||||||
FLAC::Metadata::VorbisComment *tags = 0;
|
|
||||||
|
|
||||||
printf("\n\n++++++ testing level 0 interface\n");
|
printf("\n\n++++++ testing level 0 interface\n");
|
||||||
|
|
||||||
@@ -620,7 +619,10 @@ static bool test_level_0_()
|
|||||||
|
|
||||||
printf("OK\n");
|
printf("OK\n");
|
||||||
|
|
||||||
printf("testing FLAC::Metadata::get_tags()... ");
|
{
|
||||||
|
printf("testing FLAC::Metadata::get_tags(VorbisComment *&)... ");
|
||||||
|
|
||||||
|
FLAC::Metadata::VorbisComment *tags = 0;
|
||||||
|
|
||||||
if(!FLAC::Metadata::get_tags(flacfile_, tags))
|
if(!FLAC::Metadata::get_tags(flacfile_, tags))
|
||||||
return die_("during FLAC::Metadata::get_tags()");
|
return die_("during FLAC::Metadata::get_tags()");
|
||||||
@@ -632,6 +634,22 @@ static bool test_level_0_()
|
|||||||
printf("OK\n");
|
printf("OK\n");
|
||||||
|
|
||||||
delete tags;
|
delete tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
printf("testing FLAC::Metadata::get_tags(VorbisComment &)... ");
|
||||||
|
|
||||||
|
FLAC::Metadata::VorbisComment 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");
|
||||||
|
}
|
||||||
|
|
||||||
if(!remove_file_(flacfile_))
|
if(!remove_file_(flacfile_))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user