qt5base-lts/tests/auto/corelib
João Abecasis 796f85b611 Don't operate on bogus data, assert on preconditions instead
QVector::erase shouldn't try to make sense of iterators it doesn't own,
so the validation being done here is bogus and dangerous. Instead, it's
preferrable to assert, the user needs to ensure proper ownership.

The case of erasing an empty sequence is not checked for preconditions
to allow

    QVector v;
    v.erase(v.begin(), v.end());

, while being stricter on other uses.

Autotests were using ill-formed calls to the single argument erase()
function on an empty vector and were fixed. This function erases exactly
one element, the one pointed to by abegin and require the element exist
and be valid.

Change-Id: I5f1a6d0d8da072eae0c73a3012620c4ce1065cf0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-23 14:16:33 +02:00
..
animation Make animation autotests build without widgets 2012-06-07 00:39:05 +02:00
codecs Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
global Add Q_UINT64_C to 64 bit integer literal. 2012-05-15 23:03:23 +02:00
io Skip 3 test methods if the test server isn't set up. 2012-06-23 14:16:29 +02:00
itemmodels Use a QVector<int> instead of a QSet<int> in itemviews/models. 2012-06-12 04:30:07 +02:00
json Fixed QJsonObject::find() 2012-06-06 02:03:11 +02:00
kernel Record if a metatype is a smart pointer to a QObject derived. 2012-06-20 15:45:07 +02:00
mimetypes Removed CONFIG+=parallel_test from suspected parallel-unsafe tests [2] 2012-05-23 03:17:59 +02:00
plugin make use of $$[FOO/get] properties 2012-06-19 16:39:58 +02:00
statemachine Make qstatemachine autotest build without widgets 2012-06-07 00:38:41 +02:00
thread Use QPointer instead of QWeakPointer. 2012-06-05 18:42:26 +02:00
tools Don't operate on bogus data, assert on preconditions instead 2012-06-23 14:16:33 +02:00
xml Add CONFIG+=parallel_test to suspected parallel-safe tests. 2012-05-28 07:33:01 +02:00
corelib.pro Import QMimeType / QMimeDatabase into QtCore. 2012-02-18 22:19:43 +01:00