Commit 36b2d83e authored by Bart van der Velden's avatar Bart van der Velden

Test if audio files could be opened (#65)

parent 66f2b398
......@@ -39,6 +39,7 @@ TEST(FileTypeResolverTest, FileDoesNotExistMp3Ext)
File* file = ftr.createFile("ThisDoesNotExist.mp3");
ASSERT_TRUE(file != 0);
ASSERT_TRUE(dynamic_cast<MPEG::File*>(file) != 0);
ASSERT_FALSE(file->isOpen());
}
TEST(FileTypeResolverTest, JapaneseOggFile)
......@@ -47,6 +48,7 @@ TEST(FileTypeResolverTest, JapaneseOggFile)
File* file = ftr.createFile(QFile::encodeName(datapath("data/testdata/テスト.ogg")).constData());
ASSERT_TRUE(file != 0);
ASSERT_TRUE(dynamic_cast<Ogg::Vorbis::File*>(file) != 0);
ASSERT_TRUE(file->isOpen());
}
TEST(FileTypeResolverTest, ArabicOggFile)
......@@ -55,6 +57,7 @@ TEST(FileTypeResolverTest, ArabicOggFile)
File* file = ftr.createFile(QFile::encodeName(datapath("data/testdata/اختبار.ogg")).constData());
ASSERT_TRUE(file != 0);
ASSERT_TRUE(dynamic_cast<Ogg::Vorbis::File*>(file) != 0);
ASSERT_TRUE(file->isOpen());
}
TEST(FileTypeResolverTest, RussianOggFile)
......@@ -63,4 +66,5 @@ TEST(FileTypeResolverTest, RussianOggFile)
File* file = ftr.createFile(QFile::encodeName(datapath("data/testdata/тест.ogg")).constData());
ASSERT_TRUE(file != 0);
ASSERT_TRUE(dynamic_cast<Ogg::Vorbis::File*>(file) != 0);
ASSERT_TRUE(file->isOpen());
}
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