1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-18 20:34:39 +01:00

Fix the m3u parser test

This commit is contained in:
David Sansome 2010-12-25 15:46:20 +00:00
parent eca62e037b
commit 37c0876686

View File

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