From: Mathias Panzenböck Date: Sat, 6 Aug 2011 17:43:17 +0000 (+0200) Subject: ByteVector::replace: test shrinking X-Git-Tag: v1.8beta~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4868bb56906e36e6b1b72ed738301f55d2202e61;p=taglib ByteVector::replace: test shrinking --- diff --git a/tests/test_bytevector.cpp b/tests/test_bytevector.cpp index 69326dbc..2ac78b34 100644 --- a/tests/test_bytevector.cpp +++ b/tests/test_bytevector.cpp @@ -224,6 +224,16 @@ public: a.replace(ByteVector("a"), ByteVector("")); CPPUNIT_ASSERT_EQUAL(ByteVector("bcdbf"), a); } + { + ByteVector a("abcdabf"); + a.replace(ByteVector("ab"), ByteVector("x")); + CPPUNIT_ASSERT_EQUAL(ByteVector("xcdxf"), a); + } + { + ByteVector a("abcdabf"); + a.replace(ByteVector("ab"), ByteVector()); + CPPUNIT_ASSERT_EQUAL(ByteVector("cdf"), a); + } } };