Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stefan Strogin
flac
Commits
a1e923ba
Commit
a1e923ba
authored
Jan 21, 2005
by
Josh Coalson
Browse files
add test for new form of get_tags()
parent
cd18cdcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test_libFLAC++/metadata_manip.cpp
View file @
a1e923ba
...
...
@@ -591,7 +591,6 @@ 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
"
);
...
...
@@ -620,18 +619,37 @@ static bool test_level_0_()
printf
(
"OK
\n
"
);
printf
(
"testing FLAC::Metadata::get_tags()... "
);
{
printf
(
"testing FLAC::Metadata::get_tags(VorbisComment *&)... "
);
if
(
!
FLAC
::
Metadata
::
get_tags
(
flacfile_
,
tags
))
return
die_
(
"during FLAC::Metadata::get_tags()"
);
FLAC
::
Metadata
::
VorbisComment
*
tags
=
0
;
/* 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()"
);
if
(
!
FLAC
::
Metadata
::
get_tags
(
flacfile_
,
tags
))
return
die_
(
"during FLAC::Metadata::get_tags()"
);
printf
(
"OK
\n
"
);
/* 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
;
}
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_
))
return
false
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment