diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-07-27 15:47:54 +0300 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2020-03-05 07:49:40 +0000 |
commit | 728cc964f3f25d23c72317a119b839701f5941e8 (patch) | |
tree | 5dead38f11dffbc37fcb56734c46aec4451b8122 /tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp | |
parent | 9e46dd7719b63710a6e4ffc6c43e55be710b2c5a (diff) |
QString/QByteArray: make all symmetry-checked member-compare() combinations noexcept
In QByteArray, they were just not marked as such.
In QString and QStringRef, the implicit conversion from QChar to
QString would destroy it. Add a QChar overload, delegating to
QStringView.
Added docs for the new overloads, copying from the nearest neighbor so
as to not look out of place. All string classes use different wording
for these functions. A cleanup of this state of affairs is out of the
scope of this patch.
Change-Id: I0b7b1d037aa229bcaf29b793841a18caf977d66b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp')
-rw-r--r-- | tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp index bcf4e73108..e6884bc2e5 100644 --- a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp +++ b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp @@ -830,10 +830,6 @@ void tst_QStringApiSymmetry::member_compare_impl() const QEXPECT_FAIL("", "Qt is missing a nothrow utf8-utf16 comparator", Continue); \ QVERIFY(noexcept(expr)); } while (0) - if (std::is_same<LHS, QByteArray>::value || // needs to simply be marked as noexcept - ((std::is_same<LHS, QString>::value || std::is_same<LHS, QStringRef>::value) - && std::is_same<RHS, QChar>::value)) // implict QChar -> QString conversion kills noexcept - QEXPECT_FAIL("", "known issues, will be fixed before 5.14 release", Continue); QVERIFY_NOEXCEPT(lhs.compare(rhs, Qt::CaseSensitive)); QCOMPARE(sign(lhs.compare(rhs)), caseSensitiveCompareResult); |