mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Restore FileRef::create() in order not to change the previous behavior.
This commit is contained in:
@ -80,6 +80,7 @@ class TestFileRef : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testAIFF_1);
|
||||
CPPUNIT_TEST(testAIFF_2);
|
||||
CPPUNIT_TEST(testUnsupported);
|
||||
CPPUNIT_TEST(testCreate);
|
||||
CPPUNIT_TEST(testFileResolver);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
@ -297,6 +298,19 @@ public:
|
||||
CPPUNIT_ASSERT(f2.isNull());
|
||||
}
|
||||
|
||||
void testCreate()
|
||||
{
|
||||
// This is depricated. But worth it to test.
|
||||
|
||||
File *f = FileRef::create(TEST_FILE_PATH_C("empty_vorbis.oga"));
|
||||
CPPUNIT_ASSERT(dynamic_cast<Ogg::Vorbis::File*>(f));
|
||||
delete f;
|
||||
|
||||
f = FileRef::create(TEST_FILE_PATH_C("xing.mp3"));
|
||||
CPPUNIT_ASSERT(dynamic_cast<MPEG::File*>(f));
|
||||
delete f;
|
||||
}
|
||||
|
||||
void testFileResolver()
|
||||
{
|
||||
{
|
||||
|
Reference in New Issue
Block a user