mirror of https://github.com/qt/qt5compat.git
QStringRef::lastIndexOf: adapt tests after upstream fixes
6cee204d56 and f0c2c987e3 in qtbase fixed matching at the last position of a QString(View); QStringRef needs to follow suit. Change-Id: I5e864a57d32763de56b0fc385fc029ff7b386930 Pick-to: 6.2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
b4d08bfa93
commit
228185d461
|
@ -497,12 +497,12 @@ void tst_QStringRef::lastIndexOf_data()
|
|||
|
||||
QTest::newRow("10") << a << "G" << -1 << int(a.size())-1 << true;
|
||||
QTest::newRow("11") << a << "G" << int(a.size())-1 << int(a.size())-1 << true;
|
||||
QTest::newRow("12") << a << "G" << int(a.size()) << -1 << true;
|
||||
QTest::newRow("12") << a << "G" << int(a.size()) << int(a.size())-1 << true;
|
||||
QTest::newRow("13") << a << "A" << 0 << 0 << true;
|
||||
QTest::newRow("14") << a << "A" << -1*int(a.size()) << 0 << true;
|
||||
|
||||
QTest::newRow("15") << a << "efg" << 0 << -1 << false;
|
||||
QTest::newRow("16") << a << "efg" << int(a.size()) << -1 << false;
|
||||
QTest::newRow("16") << a << "efg" << int(a.size()) << 12 << false;
|
||||
QTest::newRow("17") << a << "efg" << -1 * int(a.size()) << -1 << false;
|
||||
QTest::newRow("19") << a << "efg" << int(a.size()) - 1 << 12 << false;
|
||||
QTest::newRow("20") << a << "efg" << 12 << 12 << false;
|
||||
|
|
Loading…
Reference in New Issue