Fix the m3u parser test

This commit is contained in:
David Sansome 2010-12-25 15:46:20 +00:00
parent eca62e037b
commit 37c0876686
1 changed files with 8 additions and 2 deletions

View File

@ -57,7 +57,10 @@ TEST_F(M3UParserTest, ParsesTrackLocation) {
Song song(&taglib_);
QString line(temp.fileName());
ASSERT_TRUE(parser_.ParseTrackLocation(line, QDir(), &song));
EXPECT_EQ(temp.fileName(), song.filename());
ASSERT_EQ(temp.fileName(), song.filename());
song.InitFromFile(song.filename(), -1);
EXPECT_EQ("foo", song.title());
EXPECT_EQ("bar", song.artist());
EXPECT_EQ("baz", song.album());
@ -72,7 +75,10 @@ TEST_F(M3UParserTest, ParsesTrackLocationRelative) {
QString line(info.fileName());
Song song(&taglib_);
ASSERT_TRUE(parser.ParseTrackLocation(line, info.dir(), &song));
EXPECT_EQ(temp.fileName(), song.filename());
ASSERT_EQ(temp.fileName(), song.filename());
song.InitFromFile(song.filename(), -1);
EXPECT_EQ("foo", song.title());
}