Improve performance of QArrayData::Grow autotest
authorJoão Abecasis <joao.abecasis@nokia.com>
Sun, 29 Jul 2012 22:33:18 +0000 (00:33 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 30 Aug 2012 11:51:22 +0000 (13:51 +0200)
commited4939eaac529e40a52762118ddbf153c2bf0c16
tree612a03582f07cbb2000e20627380c1962111847d
parent36dd62ecaf692f0e518ded6abe981d5a060064a2
Improve performance of QArrayData::Grow autotest

Doing element-wise insertions for the full range of the test made
testing under valgrind extremely slow. When a reallocation is detected
we now resize() the container close to capacity(), while verifying this
doesn't unnecessarily re-allocate either.

Change-Id: Idf7015cf390e366fe444e7ca14c904a2d54ff48b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp