From e08410ab8db3d7cabf4ef2fc4de40bb6da6d6fef Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 24 Nov 2011 17:34:51 +1000 Subject: Cleanup corelib autotests Bug trackers come and go, so using bug identifiers in function and test case names will ensure that those names eventually become meaningless. It is better to choose a meaningful name and provide explanatory comments where appropriate. Change-Id: I67c27782ef21b5d4eaab4854079a043c8ef6957b Reviewed-by: Rohan McGovern --- tests/auto/corelib/tools/qvector/tst_qvector.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'tests/auto/corelib/tools/qvector/tst_qvector.cpp') diff --git a/tests/auto/corelib/tools/qvector/tst_qvector.cpp b/tests/auto/corelib/tools/qvector/tst_qvector.cpp index 2c1a17108b..77e70bd1fd 100644 --- a/tests/auto/corelib/tools/qvector/tst_qvector.cpp +++ b/tests/auto/corelib/tools/qvector/tst_qvector.cpp @@ -82,9 +82,9 @@ private slots: void testOperators() const; void outOfMemory(); - void QTBUG6416_reserve(); - void QTBUG11763_data(); - void QTBUG11763(); + void reserve(); + void reallocAfterCopy_data(); + void reallocAfterCopy(); void initializeList(); void const_shared_null(); @@ -832,7 +832,7 @@ void tst_QVector::outOfMemory() } } -void tst_QVector::QTBUG6416_reserve() +void tst_QVector::reserve() { fooCtor = 0; fooDtor = 0; @@ -845,7 +845,9 @@ void tst_QVector::QTBUG6416_reserve() QCOMPARE(fooCtor, fooDtor); } -void tst_QVector::QTBUG11763_data() +// This is a regression test for QTBUG-11763, where memory would be reallocated +// soon after copying a QVector. +void tst_QVector::reallocAfterCopy_data() { QTest::addColumn("capacity"); QTest::addColumn("fill_size"); @@ -881,12 +883,12 @@ void tst_QVector::QTBUG11763_data() result3 = i - 10; result4 = i - 20; } - QTest::newRow(qPrintable(QString("QTBUG11763:%1,%2").arg(i).arg(j))) << i << fill_size << j << result1 << result2 << result3 << result4; + QTest::newRow(qPrintable(QString("reallocAfterCopy:%1,%2").arg(i).arg(j))) << i << fill_size << j << result1 << result2 << result3 << result4; } } } -void tst_QVector::QTBUG11763() +void tst_QVector::reallocAfterCopy() { QFETCH(int, capacity); QFETCH(int, fill_size); -- cgit v1.2.3