summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-17 10:15:17 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-17 10:15:17 (GMT)
commitc679687f418b71442da07ade575482d005b79c4d (patch)
treee7f48e07a93494c6510856e2373ac2254ea2e686 /tests
parentfd3f9dd0f31efeea3aa0ec28b54c70d85712c7ba (diff)
parent02135be18f3c4b1d1525aff6dfe96c9c8521084d (diff)
downloadQt-c679687f418b71442da07ade575482d005b79c4d.zip
Qt-c679687f418b71442da07ade575482d005b79c4d.tar.gz
Qt-c679687f418b71442da07ade575482d005b79c4d.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/berlin-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/berlin-staging-1: avoid double reallocations in appending operations avoid double reallocation in string-growing replace() case optimize qHash() some more optimize QList::mid() optimization: use QList::reserve() in QSet::toList() add QList::reserve() optimization: get rid of QString::fromUtf16() usage, part 2 add QString(const QChar *) c'tor
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qlist/tst_qlist.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qlist/tst_qlist.cpp b/tests/auto/qlist/tst_qlist.cpp
index 59b2c7b..a590fca 100644
--- a/tests/auto/qlist/tst_qlist.cpp
+++ b/tests/auto/qlist/tst_qlist.cpp
@@ -60,6 +60,7 @@ private slots:
void length() const;
void lengthSignature() const;
void append() const;
+ void mid() const;
};
void tst_QList::length() const
@@ -129,5 +130,14 @@ void tst_QList::append() const
}
+void tst_QList::mid() const
+{
+ QList<QString> list;
+ list << "foo" << "bar" << "baz" << "bak" << "buck" << "hello" << "kitty";
+
+ QCOMPARE(list.mid(3, 3),
+ QList<QString>() << "bak" << "buck" << "hello");
+}
+
QTEST_APPLESS_MAIN(tst_QList)
#include "tst_qlist.moc"