Rewrote ByteVector::replace() simpler

This commit is contained in:
Tsuda Kageyu
2013-11-14 14:05:32 +09:00
parent ee9720a997
commit 4a7d31c87b
2 changed files with 35 additions and 51 deletions

View File

@ -239,6 +239,11 @@ public:
a.replace(ByteVector("ab"), ByteVector());
CPPUNIT_ASSERT_EQUAL(ByteVector("cdf"), a);
}
{
ByteVector a("abcdabf");
a.replace(ByteVector("bf"), ByteVector("x"));
CPPUNIT_ASSERT_EQUAL(ByteVector("abcdax"), a);
}
}
};