Merge pull request #532 from TsudaKageyu/bytevector-detach-test

A little robuster tests for ByteVector iterators after detaching.
This commit is contained in:
Lukáš Lalinský 2015-04-29 10:14:16 -07:00
commit 62ab41fa07

View File

@ -321,8 +321,17 @@ public:
CPPUNIT_ASSERT_EQUAL('A', *it4);
ByteVector v3;
v3 = ByteVector("taglib").mid(3);
CPPUNIT_ASSERT_EQUAL('l', *v3.begin());
v3 = ByteVector("0123456789").mid(3, 4);
it1 = v3.begin();
it2 = v3.end() - 1;
CPPUNIT_ASSERT_EQUAL('3', *it1);
CPPUNIT_ASSERT_EQUAL('6', *it2);
it3 = v3.rbegin();
it4 = v3.rend() - 1;
CPPUNIT_ASSERT_EQUAL('6', *it3);
CPPUNIT_ASSERT_EQUAL('3', *it4);
}
};