diff options
author | Jędrzej Nowacki <jedrzej.nowacki@digia.com> | 2014-02-19 11:27:50 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-16 18:24:14 +0200 |
commit | 39efc7c3e3a08580f00a19678d2975608d41aa17 (patch) | |
tree | 9083859152bb7ee394da5edd61bde5975fa47cbe /tests/auto | |
parent | 7c17b0ad2b74086a52aa6b66c1673335ce65bd5b (diff) |
Optimize QVector::mid
Change-Id: Iff7d9ec85a095c6712e6045e7708bb88eac629e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/tools/qvector/tst_qvector.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qvector/tst_qvector.cpp b/tests/auto/corelib/tools/qvector/tst_qvector.cpp index 776251fa52..97f370f146 100644 --- a/tests/auto/corelib/tools/qvector/tst_qvector.cpp +++ b/tests/auto/corelib/tools/qvector/tst_qvector.cpp @@ -1379,6 +1379,8 @@ void tst_QVector::mid() const list << "foo" << "bar" << "baz" << "bak" << "buck" << "hello" << "kitty"; QCOMPARE(list.mid(3, 3), QVector<QString>() << "bak" << "buck" << "hello"); + QCOMPARE(list.mid(6, 10), QVector<QString>() << "kitty"); + QCOMPARE(list.mid(-1, 20), list); QCOMPARE(list.mid(4), QVector<QString>() << "buck" << "hello" << "kitty"); } |