diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-11-24 17:34:51 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-25 07:56:16 +0100 |
commit | e08410ab8db3d7cabf4ef2fc4de40bb6da6d6fef (patch) | |
tree | 9d6e154364039ab6cbc7a789ef33b7e0ce038e51 /tests/auto/corelib/tools/qvector/tst_qvector.cpp | |
parent | 489a39aacc102e46a5b3fffd5839ed694bb7214f (diff) |
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 <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/tools/qvector/tst_qvector.cpp')
-rw-r--r-- | tests/auto/corelib/tools/qvector/tst_qvector.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
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<int>("capacity"); QTest::addColumn<int>("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); |