From: Tsuda Kageyu Date: Fri, 7 Aug 2015 07:45:44 +0000 (+0900) Subject: Improve a test about splitting OGG pages. X-Git-Tag: v1.10beta~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eff92fed985d0a1ed2ee373a2c66753043a2223a;p=taglib Improve a test about splitting OGG pages. Check for #529. --- diff --git a/tests/test_ogg.cpp b/tests/test_ogg.cpp index f5f27bbc..72f51942 100644 --- a/tests/test_ogg.cpp +++ b/tests/test_ogg.cpp @@ -45,13 +45,18 @@ public: ScopedFileCopy copy("empty", ".ogg"); string newname = copy.fileName(); + String longText(std::string(128 * 1024, ' ').c_str()); + for(size_t i = 0; i < longText.length(); ++i) + longText[i] = static_cast(L'A' + (i % 26)); + Vorbis::File *f = new Vorbis::File(newname.c_str()); - f->tag()->addField("test", ByteVector(128 * 1024, 'x') + ByteVector(1, '\0')); + f->tag()->setTitle(longText); f->save(); delete f; f = new Vorbis::File(newname.c_str()); CPPUNIT_ASSERT_EQUAL(19, f->lastPageHeader()->pageSequenceNumber()); + CPPUNIT_ASSERT_EQUAL(longText, f->tag()->title()); delete f; }