summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-11-29 12:53:30 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-29 05:16:52 +0100
commitc5b55d44032203612f98f89858a2198b4c6606ec (patch)
treef2dc003fc0092ab3d6f57fcda93b8b9a2c7b87a1 /tests/auto/corelib/tools
parente881f4f5fdedf724ce2a5cd9fe2d448c4f8dbaa3 (diff)
Cleanup corelib autotests
Don't name test functions using task identifiers from obsolete bug trackers. Change-Id: Iba6ae8ad3b39e365c5510ed5c86749a167572829 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r--tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp4
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp17
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp10
3 files changed, 16 insertions, 15 deletions
diff --git a/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp b/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
index 09a3dfdf7d..cb153b4f8b 100644
--- a/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
+++ b/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
@@ -55,7 +55,7 @@ class tst_QByteArrayMatcher : public QObject
private slots:
void interface();
- void task251958();
+ void indexIn();
};
static QByteArrayMatcher matcher1;
@@ -106,7 +106,7 @@ void tst_QByteArrayMatcher::interface()
static QByteArrayMatcher matcher;
-void tst_QByteArrayMatcher::task251958()
+void tst_QByteArrayMatcher::indexIn()
{
const char p_data[] = { 0x0, 0x0, 0x1 };
QByteArray pattern(p_data, sizeof(p_data));
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
index 90a8927631..b536b88fa3 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
@@ -75,7 +75,7 @@ private slots:
void timeSpec();
void toTime_t_data();
void toTime_t();
- void task_137698();
+ void daylightSavingsTimeChange();
void setDate();
void setTime();
void setTimeSpec();
@@ -1131,15 +1131,16 @@ void tst_QDateTime::toTime_t()
}
}
-void tst_QDateTime::task_137698()
+void tst_QDateTime::daylightSavingsTimeChange()
{
- // This bug is caused by QDateTime knowing more than it lets show
- // Internally, if it knows, QDateTime stores a flag indicating if the time is
- // DST or not. If it doesn't, it sets to "LocalUnknown"
+ // This is a regression test for an old bug where starting with a date in
+ // DST and then moving to a date outside it (or vice-versa) caused 1-hour
+ // jumps in time when addSecs() was called.
//
- // The problem happens if you start with a date in DST and then move to a date
- // outside it (or vice-versa). Some functions did not reset the flag, which caused
- // weird 1-hour jumps in time when addSecs() was called.
+ // The bug was caused by QDateTime knowing more than it lets show.
+ // Internally, if it knows, QDateTime stores a flag indicating if the time is
+ // DST or not. If it doesn't, it sets to "LocalUnknown". The problem happened
+ // because some functions did not reset the flag when moving in or out of DST.
// WARNING: This test only works if there's a Daylight Savings Time change
// in the current locale between 2006-11-06 and 2006-10-16
diff --git a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
index c36f293745..a005d5df7a 100644
--- a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
+++ b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
@@ -55,7 +55,7 @@ private slots:
void append();
void removeLast();
void oldTests();
- void task214223();
+ void appendCausingRealloc();
void resize();
void realloc();
};
@@ -248,11 +248,11 @@ void tst_QVarLengthArray::oldTests()
}
}
-void tst_QVarLengthArray::task214223()
+void tst_QVarLengthArray::appendCausingRealloc()
{
- //creating a QVarLengthArray of the same size as the prealloc size
- // will make the next call to append(const T&) corrupt the memory
- // you should get a segfault pretty soon after that :-)
+ // This is a regression test for an old bug where creating a
+ // QVarLengthArray of the same size as the prealloc size would make
+ // the next call to append(const T&) corrupt the memory.
QVarLengthArray<float, 1> d(1);
for (int i=0; i<30; i++)
d.append(i);