Added some test cases for FileRef about unsupported files

This commit is contained in:
Tsuda Kageyu 2013-06-21 15:29:00 +09:00
parent 7e866e11ad
commit a845f70c49
3 changed files with 10 additions and 0 deletions

BIN
tests/data/no-extension Normal file

Binary file not shown.

Binary file not shown.

View File

@ -27,6 +27,7 @@ class TestFileRef : public CppUnit::TestFixture
CPPUNIT_TEST(testTrueAudio);
CPPUNIT_TEST(testAPE);
CPPUNIT_TEST(testWav);
CPPUNIT_TEST(testUnsupported);
CPPUNIT_TEST_SUITE_END();
public:
@ -148,6 +149,15 @@ public:
{
fileRefSave("mac-399", ".ape");
}
void testUnsupported()
{
FileRef f1(TEST_FILE_PATH_C("no-extension"));
CPPUNIT_ASSERT(f1.isNull());
FileRef f2(TEST_FILE_PATH_C("unsupported-extension.xxx"));
CPPUNIT_ASSERT(f2.isNull());
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestFileRef);