summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
index 8a55f54449..2d577bb0ab 100644
--- a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
+++ b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
@@ -100,6 +100,11 @@ void tst_QStringMatcher::indexIn()
matcher.setPattern(needle);
QCOMPARE(matcher.indexIn(haystack, from), indexIn);
+
+ const auto needleSV = QStringView(needle);
+ QStringMatcher matcherSV(needleSV);
+
+ QCOMPARE(matcherSV.indexIn(QStringView(haystack), from), indexIn);
}
void tst_QStringMatcher::setCaseSensitivity_data()
@@ -128,6 +133,7 @@ void tst_QStringMatcher::setCaseSensitivity()
matcher.setCaseSensitivity(static_cast<Qt::CaseSensitivity> (cs));
QCOMPARE(matcher.indexIn(haystack, from), indexIn);
+ QCOMPARE(matcher.indexIn(QStringView(haystack), from), indexIn);
}
void tst_QStringMatcher::assignOperator()