Commit 6cd69b77 authored by Bart van der Velden's avatar Bart van der Velden

Fix from Linux (#65)

parent 9cd480e0
......@@ -32,7 +32,9 @@ public:
private:
QString m_fileName;
QByteArray m_byteArray;
#ifndef WIN32
mutable QByteArray m_byteArray;
#endif
};
QString datapath(const QString& relPath)
......@@ -52,7 +54,7 @@ TagLib::FileName QStringToFileName(const QString& path)
TEST(FileTypeResolverTest, EmptyPath)
{
FileTypeResolver ftr;
TestFileName fileName = "";
TestFileName fileName("");
File* file = ftr.createFile(fileName.TagLibFileName());
EXPECT_EQ(0, file);
}
......@@ -60,7 +62,7 @@ TEST(FileTypeResolverTest, EmptyPath)
TEST(FileTypeResolverTest, FileDoesNotExist)
{
FileTypeResolver ftr;
TestFileName fileName = "ThisDoesNotExist";
TestFileName fileName("ThisDoesNotExist");
File* file = ftr.createFile(fileName.TagLibFileName());
EXPECT_EQ(0, file);
}
......@@ -68,7 +70,7 @@ TEST(FileTypeResolverTest, FileDoesNotExist)
TEST(FileTypeResolverTest, FileDoesNotExistMp3Ext)
{
FileTypeResolver ftr;
TestFileName fileName = "ThisDoesNotExist.mp3";
TestFileName fileName("ThisDoesNotExist.mp3");
File* file = ftr.createFile(fileName.TagLibFileName());
ASSERT_TRUE(file != 0);
ASSERT_TRUE(dynamic_cast<MPEG::File*>(file) != 0);
......@@ -78,7 +80,7 @@ TEST(FileTypeResolverTest, FileDoesNotExistMp3Ext)
TEST(FileTypeResolverTest, OggFileExists)
{
FileTypeResolver ftr;
TestFileName fileName = datapath("test.ogg");
TestFileName fileName(datapath("test.ogg"));
File* file = ftr.createFile(fileName.TagLibFileName());
ASSERT_TRUE(file != 0);
ASSERT_TRUE(dynamic_cast<Ogg::Vorbis::File*>(file) != 0);
......@@ -88,7 +90,7 @@ TEST(FileTypeResolverTest, OggFileExists)
TEST(FileTypeResolverTest, JapaneseOggFile)
{
FileTypeResolver ftr;
TestFileName fileName = datapath("テスト.ogg");
TestFileName fileName(datapath("テスト.ogg"));
File* file = ftr.createFile(fileName.TagLibFileName());
ASSERT_TRUE(file != 0);
ASSERT_TRUE(dynamic_cast<Ogg::Vorbis::File*>(file) != 0);
......@@ -98,7 +100,7 @@ TEST(FileTypeResolverTest, JapaneseOggFile)
TEST(FileTypeResolverTest, ArabicOggFile)
{
FileTypeResolver ftr;
TestFileName fileName = datapath("اختبار.ogg");
TestFileName fileName(datapath("اختبار.ogg"));
File* file = ftr.createFile(fileName.TagLibFileName());
ASSERT_TRUE(file != 0);
ASSERT_TRUE(dynamic_cast<Ogg::Vorbis::File*>(file) != 0);
......@@ -108,7 +110,7 @@ TEST(FileTypeResolverTest, ArabicOggFile)
TEST(FileTypeResolverTest, RussianOggFile)
{
FileTypeResolver ftr;
TestFileName fileName = datapath("тест.ogg");
TestFileName fileName(datapath("тест.ogg"));
File* file = ftr.createFile(fileName.TagLibFileName());
ASSERT_TRUE(file != 0);
ASSERT_TRUE(dynamic_cast<Ogg::Vorbis::File*>(file) != 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment