Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
flac
Commits
798e1617
Commit
798e1617
authored
Jan 15, 2003
by
Josh Coalson
Browse files
add some more missing unit tests
parent
3123b071
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test_libFLAC/metadata_object.c
View file @
798e1617
...
...
@@ -1244,6 +1244,16 @@ FLAC__bool test_metadata_object()
return
false
;
printf
(
"OK
\n
"
);
printf
(
"testing FLAC__metadata_object_cuesheet_insert_blank_track() on end of non-empty array..."
);
cs_insert_new_
(
&
track
,
cuesheet
,
4
,
0
,
0
,
"
\0\0\0\0\0\0\0\0\0\0\0\0
"
,
false
,
false
);
if
(
!
FLAC__metadata_object_cuesheet_insert_blank_track
(
block
,
4
))
{
printf
(
"FAILED, returned false
\n
"
);
return
false
;
}
if
(
!
mutils__compare_block
(
cuesheet
,
block
))
return
false
;
printf
(
"OK
\n
"
);
printf
(
"testing FLAC__metadata_object_clone()... "
);
blockcopy
=
FLAC__metadata_object_clone
(
block
);
if
(
0
==
blockcopy
)
{
...
...
@@ -1258,6 +1268,16 @@ FLAC__bool test_metadata_object()
FLAC__metadata_object_delete
(
blockcopy
);
printf
(
"OK
\n
"
);
printf
(
"testing FLAC__metadata_object_cuesheet_delete_track() on end of array..."
);
cs_delete_
(
cuesheet
,
4
);
if
(
!
FLAC__metadata_object_cuesheet_delete_track
(
block
,
4
))
{
printf
(
"FAILED, returned false
\n
"
);
return
false
;
}
if
(
!
mutils__compare_block
(
cuesheet
,
block
))
return
false
;
printf
(
"OK
\n
"
);
printf
(
"testing FLAC__metadata_object_cuesheet_delete_track() on middle of array..."
);
cs_delete_
(
cuesheet
,
2
);
if
(
!
FLAC__metadata_object_cuesheet_delete_track
(
block
,
2
))
{
...
...
@@ -1373,6 +1393,18 @@ FLAC__bool test_metadata_object()
return
false
;
printf
(
"OK
\n
"
);
index
.
offset
=
0
;
index
.
number
=
0
;
printf
(
"testing FLAC__metadata_object_cuesheet_track_insert_blank_index() on end of non-empty array..."
);
tr_insert_new_
(
cuesheet
,
0
,
4
,
index
);
if
(
!
FLAC__metadata_object_cuesheet_track_insert_blank_index
(
block
,
0
,
4
))
{
printf
(
"FAILED, returned false
\n
"
);
return
false
;
}
if
(
!
mutils__compare_block
(
cuesheet
,
block
))
return
false
;
printf
(
"OK
\n
"
);
printf
(
"testing FLAC__metadata_object_clone()... "
);
blockcopy
=
FLAC__metadata_object_clone
(
block
);
if
(
0
==
blockcopy
)
{
...
...
@@ -1387,6 +1419,16 @@ FLAC__bool test_metadata_object()
FLAC__metadata_object_delete
(
blockcopy
);
printf
(
"OK
\n
"
);
printf
(
"testing FLAC__metadata_object_cuesheet_track_delete_index() on end of array..."
);
tr_delete_
(
cuesheet
,
0
,
4
);
if
(
!
FLAC__metadata_object_cuesheet_track_delete_index
(
block
,
0
,
4
))
{
printf
(
"FAILED, returned false
\n
"
);
return
false
;
}
if
(
!
mutils__compare_block
(
cuesheet
,
block
))
return
false
;
printf
(
"OK
\n
"
);
printf
(
"testing FLAC__metadata_object_cuesheet_track_delete_index() on middle of array..."
);
tr_delete_
(
cuesheet
,
0
,
2
);
if
(
!
FLAC__metadata_object_cuesheet_track_delete_index
(
block
,
0
,
2
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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