Skip to content
Permalink
Browse files

Merge pull request #3 from choroba/test_is

Improve messages on test failures
  • Loading branch information...
davorg committed Mar 3, 2019
2 parents 47037dc + 46f19f6 commit 1a2a3965e1f2d5da8911cffc503a3d1dd0d70a47
Showing with 21 additions and 21 deletions.
  1. +7 −7 t/1_read.t
  2. +14 −14 t/2_write.t
@@ -6,10 +6,10 @@ BEGIN { use_ok('AudioFile::Info'); }

my $song = AudioFile::Info->new('t/test.mp3',
{ mp3 => 'AudioFile::Info::MP3::Tag' });
ok(ref $song eq 'AudioFile::Info::MP3::Tag');
ok($song->title eq 'test');
ok($song->artist eq 'davorg');
ok($song->album eq 'none');
ok($song->track eq '0');
ok($song->year eq '2003');
ok($song->genre eq 'nonsense');
is(ref $song, 'AudioFile::Info::MP3::Tag');
is($song->title, 'test');
is($song->artist, 'davorg');
is($song->album, 'none');
is($song->track, '0');
is($song->year, '2003');
is($song->genre, 'nonsense');
@@ -12,13 +12,13 @@ copy "$Bin/test.mp3", "$Bin/test2.mp3";

my $song = AudioFile::Info->new('t/test2.mp3',
{ mp3 => 'AudioFile::Info::MP3::Tag' });
ok(ref $song eq 'AudioFile::Info::MP3::Tag');
ok($song->title eq 'test');
ok($song->artist eq 'davorg');
ok($song->album eq 'none');
ok($song->track eq '0');
ok($song->year eq '2003');
ok($song->genre eq 'nonsense');
is(ref $song, 'AudioFile::Info::MP3::Tag');
is($song->title, 'test');
is($song->artist, 'davorg');
is($song->album, 'none');
is($song->track, '0');
is($song->year, '2003');
is($song->genre, 'nonsense');
$song->genre('xxx');
$song->title('xxx');
$song->artist('xxx');
@@ -30,12 +30,12 @@ undef $song;

$song = AudioFile::Info->new('t/test2.mp3',
{ mp3 => 'AudioFile::Info::MP3::Tag' });
ok(ref $song eq 'AudioFile::Info::MP3::Tag');
ok($song->genre eq 'xxx');
ok($song->title eq 'xxx');
ok($song->artist eq 'xxx');
ok($song->album eq 'xxx');
ok($song->track eq '1');
ok($song->year eq '2000');
is(ref $song, 'AudioFile::Info::MP3::Tag');
is($song->genre, 'xxx');
is($song->title, 'xxx');
is($song->artist, 'xxx');
is($song->album, 'xxx');
is($song->track, '1');
is($song->year, '2000');

unlink("$Bin/test2.mp3");

0 comments on commit 1a2a396

Please sign in to comment.
You can’t perform that action at this time.