summaryrefslogtreecommitdiff
path: root/src/test_libFLAC++/metadata_object.cpp
diff options
context:
space:
mode:
authorJosh Coalson <jcoalson@users.sourceforce.net>2002-12-05 06:37:46 +0000
committerJosh Coalson <jcoalson@users.sourceforce.net>2002-12-05 06:37:46 +0000
commit8f0c71b8779352b55f2fe24e5f8dfeea6c69b18f (patch)
tree1f021681b8da1bca54751cb553b5680f14f684f3 /src/test_libFLAC++/metadata_object.cpp
parentb96199d2ac2d1cf6f4ad45066ca26951500d6210 (diff)
downloadflac-8f0c71b8779352b55f2fe24e5f8dfeea6c69b18f.tar.gz
add "is_cd" flag to CUESHEET everywhere
Diffstat (limited to 'src/test_libFLAC++/metadata_object.cpp')
-rw-r--r--src/test_libFLAC++/metadata_object.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test_libFLAC++/metadata_object.cpp b/src/test_libFLAC++/metadata_object.cpp
index 6277add1..1993ba67 100644
--- a/src/test_libFLAC++/metadata_object.cpp
+++ b/src/test_libFLAC++/metadata_object.cpp
@@ -138,6 +138,7 @@ static void init_metadata_blocks_()
(
FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN +
FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN +
+ FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN +
FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN +
FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN
) / 8 +
@@ -162,6 +163,7 @@ static void init_metadata_blocks_()
cuesheet_.data.cue_sheet.media_catalog_number[0] = 'j';
cuesheet_.data.cue_sheet.media_catalog_number[1] = 'C';
cuesheet_.data.cue_sheet.lead_in = 159;
+ cuesheet_.data.cue_sheet.is_cd = true;
cuesheet_.data.cue_sheet.num_tracks = 2;
cuesheet_.data.cue_sheet.tracks = (FLAC__StreamMetadata_CueSheet_Track*)malloc_or_die_(cuesheet_.data.cue_sheet.num_tracks * sizeof(FLAC__StreamMetadata_CueSheet_Track));
cuesheet_.data.cue_sheet.tracks[0].offset = 1;
@@ -1166,6 +1168,7 @@ bool test_metadata_object_cuesheet()
expected_length = (
FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN +
FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN +
+ FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN +
FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN +
FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN
) / 8;
@@ -1254,6 +1257,11 @@ bool test_metadata_object_cuesheet()
return die_("value mismatch, expected 0");
printf("OK\n");
+ printf("testing CueSheet::get_is_cd()... ");
+ if(block.get_is_cd())
+ return die_("value mismatch, expected false");
+ printf("OK\n");
+
printf("testing CueSheet::get_num_tracks()... ");
if(block.get_num_tracks() != 0)
return die_("value mismatch, expected 0");
@@ -1276,6 +1284,12 @@ bool test_metadata_object_cuesheet()
return die_("value mismatch");
printf("OK\n");
+ printf("testing CueSheet::set_is_cd()... ");
+ block.set_is_cd(true);
+ if(!block.get_is_cd())
+ return die_("value mismatch");
+ printf("OK\n");
+
printf("testing CueSheet::insert_track()... +\n");
printf(" CueSheet::get_track()... ");
if(!block.insert_track(0, track0))