Merge pull request #942 from uqs/master

Fix spelling of Bebop and update Fusion and Hardcore to match Wikipedia
This commit is contained in:
Urs Fleisch
2020-12-28 09:07:34 +01:00
2 changed files with 43 additions and 9 deletions

View File

@ -40,6 +40,7 @@ class TestID3v1 : public CppUnit::TestFixture
CPPUNIT_TEST_SUITE(TestID3v1);
CPPUNIT_TEST(testStripWhiteSpace);
CPPUNIT_TEST(testGenres);
CPPUNIT_TEST(testRenamedGenres);
CPPUNIT_TEST_SUITE_END();
public:
@ -68,6 +69,18 @@ public:
CPPUNIT_ASSERT_EQUAL(100, ID3v1::genreIndex("Humour"));
}
void testRenamedGenres()
{
CPPUNIT_ASSERT_EQUAL(String("Bebop"), ID3v1::genre(85));
CPPUNIT_ASSERT_EQUAL(85, ID3v1::genreIndex("Bebop"));
CPPUNIT_ASSERT_EQUAL(85, ID3v1::genreIndex("Bebob"));
ID3v1::Tag tag;
tag.setGenre("Hardcore");
CPPUNIT_ASSERT_EQUAL(String("Hardcore Techno"), tag.genre());
CPPUNIT_ASSERT_EQUAL(129U, tag.genreNumber());
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestID3v1);