X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=t%2FAudio-Opusfile.t;fp=t%2FAudio-Opusfile.t;h=8ef7793f4a08c3f770f84ebc5257684fdeee0ebd;hb=b9bd6a0d2a03539515f640a43bad1f54dca8b0b5;hp=ca00190215381a890161e0211bd97cd0f1608957;hpb=b658996033eac41ec27a1cae2d054cb28c1f4230;p=audio-opusfile.git diff --git a/t/Audio-Opusfile.t b/t/Audio-Opusfile.t index ca00190..8ef7793 100644 --- a/t/Audio-Opusfile.t +++ b/t/Audio-Opusfile.t @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 23; BEGIN { use_ok('Audio::Opusfile') }; my $fail = 0; @@ -34,6 +34,21 @@ is $of->link_count, 1, 'link_count'; is $of->serialno(0), 1745145935, 'serialno, arg=0'; is $of->serialno(200), 1745145935, 'serialno, arg=200'; is $of->serialno, 1745145935, 'serialno, no arg'; + +my $head = $of->head; +is $head->version, 1, 'head->version'; +is $head->channel_count, 2, 'head->channel_count'; +is $head->pre_skip, 356, 'head->pre_skip'; +is $head->input_sample_rate, 44100, 'head->input_sample_rate'; +is $head->output_gain, 0, 'head->output_gain'; +is $head->mapping_family, 0, 'head->mapping_family'; +is $head->stream_count, 1, 'head->stream_count'; +is $head->coupled_count, 1, 'head->coupled_count'; +is $head->mapping(0), 0, 'head->mapping(0)'; +is $head->mapping(1), 1, 'head->mapping(1)'; +eval { $head->mapping(1000) }; +isn::t $@, '', 'head->mapping(1000) dies'; + my $tags = $of->tags; is $tags->query_count('TITLE'), 1, 'query_count'; is $tags->query('TITLE'), 'Cellule', 'query';