summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qstringapisymmetry
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-04-24 11:31:00 +0200
committerMarc Mutz <marc.mutz@kdab.com>2017-04-28 16:41:26 +0000
commit5f3d6ce5709466d08b11b6f2c8608d131e7c3f43 (patch)
tree8823ae65091a687569498ae723bfcd11c045707c /tests/auto/corelib/tools/qstringapisymmetry
parentcac2fc81b75f60d84b850fec81b432b020e89ed3 (diff)
QString/Ref: add startsWith/endsWith(QStringView) overloads
[ChangeLog][QtCore][QString/QStringRef] Added startsWith(), endsWith() overloads taking QStringView. Change-Id: Ice6332492d19fd7477d5ac43ecbf6b70175b23ca Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools/qstringapisymmetry')
-rw-r--r--tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp
index 8e5848a592..890cca7a55 100644
--- a/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp
+++ b/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp
@@ -189,11 +189,13 @@ private:
template <typename Haystack, typename Needle> void endsWith_impl() const;
private Q_SLOTS:
- // test all combinations of {QString, QStringRef} x {QString, QStringRef, QLatin1String, QChar}:
+ // test all combinations of {QString, QStringRef} x {QString, QStringRef, QStringView, QLatin1String, QChar}:
void startsWith_QString_QString_data() { startsWith_data(); }
void startsWith_QString_QString() { startsWith_impl<QString, QString>(); }
void startsWith_QString_QStringRef_data() { startsWith_data(); }
void startsWith_QString_QStringRef() { startsWith_impl<QString, QStringRef>(); }
+ void startsWith_QString_QStringView_data() { startsWith_data(); }
+ void startsWith_QString_QStringView() { startsWith_impl<QString, QStringView>(); }
void startsWith_QString_QLatin1String_data() { startsWith_data(); }
void startsWith_QString_QLatin1String() { startsWith_impl<QString, QLatin1String>(); }
void startsWith_QString_QChar_data() { startsWith_data(false); }
@@ -203,6 +205,8 @@ private Q_SLOTS:
void startsWith_QStringRef_QString() { startsWith_impl<QStringRef, QString>(); }
void startsWith_QStringRef_QStringRef_data() { startsWith_data(); }
void startsWith_QStringRef_QStringRef() { startsWith_impl<QStringRef, QStringRef>(); }
+ void startsWith_QStringRef_QStringView_data() { startsWith_data(); }
+ void startsWith_QStringRef_QStringView() { startsWith_impl<QStringRef, QStringView>(); }
void startsWith_QStringRef_QLatin1String_data() { startsWith_data(); }
void startsWith_QStringRef_QLatin1String() { startsWith_impl<QStringRef, QLatin1String>(); }
void startsWith_QStringRef_QChar_data() { startsWith_data(false); }
@@ -212,6 +216,8 @@ private Q_SLOTS:
void endsWith_QString_QString() { endsWith_impl<QString, QString>(); }
void endsWith_QString_QStringRef_data() { endsWith_data(); }
void endsWith_QString_QStringRef() { endsWith_impl<QString, QStringRef>(); }
+ void endsWith_QString_QStringView_data() { endsWith_data(); }
+ void endsWith_QString_QStringView() { endsWith_impl<QString, QStringView>(); }
void endsWith_QString_QLatin1String_data() { endsWith_data(); }
void endsWith_QString_QLatin1String() { endsWith_impl<QString, QLatin1String>(); }
void endsWith_QString_QChar_data() { endsWith_data(false); }
@@ -221,6 +227,8 @@ private Q_SLOTS:
void endsWith_QStringRef_QString() { endsWith_impl<QStringRef, QString>(); }
void endsWith_QStringRef_QStringRef_data() { endsWith_data(); }
void endsWith_QStringRef_QStringRef() { endsWith_impl<QStringRef, QStringRef>(); }
+ void endsWith_QStringRef_QStringView_data() { endsWith_data(); }
+ void endsWith_QStringRef_QStringView() { endsWith_impl<QStringRef, QStringView>(); }
void endsWith_QStringRef_QLatin1String_data() { endsWith_data(); }
void endsWith_QStringRef_QLatin1String() { endsWith_impl<QStringRef, QLatin1String>(); }
void endsWith_QStringRef_QChar_data() { endsWith_data(false); }