aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLukáš Lalinský <lalinsky@gmail.com>2011-04-05 15:16:17 +0200
committerLukáš Lalinský <lalinsky@gmail.com>2011-04-05 15:16:17 +0200
commitaa57db3a391d6a00473e006431b6acb78bfd47b9 (patch)
tree868bb4a922a90eb41be9c145a806522f9302a5ec /tests
parentf9d38129b84bb3f9e3476238cba53d77f2fa26ca (diff)
Convert frames TIPL and TMCL (2.4) to IPLS (2.3)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_id3v2.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_id3v2.cpp b/tests/test_id3v2.cpp
index d3adc632..440e4f1e 100644
--- a/tests/test_id3v2.cpp
+++ b/tests/test_id3v2.cpp
@@ -488,6 +488,12 @@ public:
tf = new ID3v2::TextIdentificationFrame("TDRC", String::Latin1);
tf->setText("2012-04-17T12:01");
foo.ID3v2Tag()->addFrame(tf);
+ tf = new ID3v2::TextIdentificationFrame("TMCL", String::Latin1);
+ tf->setText(StringList().append("Guitar").append("Artist 1").append("Drums").append("Artist 2"));
+ foo.ID3v2Tag()->addFrame(tf);
+ tf = new ID3v2::TextIdentificationFrame("TIPL", String::Latin1);
+ tf->setText(StringList().append("Producer").append("Artist 3").append("Mastering").append("Artist 4"));
+ foo.ID3v2Tag()->addFrame(tf);
foo.ID3v2Tag()->addFrame(new ID3v2::TextIdentificationFrame("TDRL", String::Latin1));
foo.ID3v2Tag()->addFrame(new ID3v2::TextIdentificationFrame("TDTG", String::Latin1));
foo.ID3v2Tag()->addFrame(new ID3v2::TextIdentificationFrame("TMOO", String::Latin1));
@@ -507,6 +513,17 @@ public:
CPPUNIT_ASSERT(tf);
CPPUNIT_ASSERT_EQUAL(TagLib::uint(1), tf->fieldList().size());
CPPUNIT_ASSERT_EQUAL(String("2012"), tf->fieldList().front());
+ tf = dynamic_cast<ID3v2::TextIdentificationFrame *>(bar.ID3v2Tag()->frameList("IPLS").front());
+ CPPUNIT_ASSERT(tf);
+ CPPUNIT_ASSERT_EQUAL(TagLib::uint(8), tf->fieldList().size());
+ CPPUNIT_ASSERT_EQUAL(String("Guitar"), tf->fieldList()[0]);
+ CPPUNIT_ASSERT_EQUAL(String("Artist 1"), tf->fieldList()[1]);
+ CPPUNIT_ASSERT_EQUAL(String("Drums"), tf->fieldList()[2]);
+ CPPUNIT_ASSERT_EQUAL(String("Artist 2"), tf->fieldList()[3]);
+ CPPUNIT_ASSERT_EQUAL(String("Producer"), tf->fieldList()[4]);
+ CPPUNIT_ASSERT_EQUAL(String("Artist 3"), tf->fieldList()[5]);
+ CPPUNIT_ASSERT_EQUAL(String("Mastering"), tf->fieldList()[6]);
+ CPPUNIT_ASSERT_EQUAL(String("Artist 4"), tf->fieldList()[7]);
CPPUNIT_ASSERT(!bar.ID3v2Tag()->frameListMap().contains("TDRL"));
CPPUNIT_ASSERT(!bar.ID3v2Tag()->frameListMap().contains("TDTG"));
CPPUNIT_ASSERT(!bar.ID3v2Tag()->frameListMap().contains("TMOO"));