summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2024-02-12 17:56:31 +0100
committerIvan Solovev <ivan.solovev@qt.io>2024-02-20 01:04:33 +0100
commit9b945b381a78b56b14d46ec314f0f69264ac0602 (patch)
tree91002c87dcd13cec4b3b2a33f68f35738560acb9 /tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
parent05e5b87ba0b0b26ae7d330018c027d22a52d7644 (diff)
Add QUtf8StringView vs byte array relational operators
... by using the new comparison helper macros. First the relational operators between QU8SV and QBAV where added, and this resulted in the ambiguities when comparing QU8SV vs QBA. So, the relational operators between QU8SV and QBA are also added in the same commit. This, in turn, resulted in ambiguities when comparing QU8SV and const char *, so add these relational operators as well. Use the regular QT_NO_CAST_FROM_ASCII and QT_RESTRICTED_CAST_FROM_ASCII guards to disable the operators if the cast from ASCII is forbidden. Also use QT_ASCII_CAST_WARN on each operator. This allows to enable related tests in tst_qstringapisymmetry. Task-number: QTBUG-117661 Task-number: QTBUG-108805 Change-Id: If7919496fdf4519fd2a9398397a39210aadba077 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp')
-rw-r--r--tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
index 0b4c2f87fa..8cf04c40ea 100644
--- a/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
+++ b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
@@ -72,8 +72,6 @@ MAKE_ALL(QChar, const char*)
MAKE_ALL(QChar, QUtf8StringView)
MAKE_ALL(QString, QUtf8StringView)
-MAKE_ALL(QByteArray, QUtf8StringView)
-MAKE_ALL(const char*, QUtf8StringView)
MAKE_ALL(QUtf8StringView, QChar)
MAKE_ALL(QUtf8StringView, char16_t)
@@ -257,14 +255,12 @@ private Q_SLOTS:
void compare_QUtf8StringView_QUtf8StringView() { compare_impl<QUtf8StringView, QUtf8StringView>(); }
void compare_QUtf8StringView_QLatin1String_data() { compare_data(); }
void compare_QUtf8StringView_QLatin1String() { compare_impl<QUtf8StringView, QLatin1String>(); }
-#ifdef NOT_YET_IMPLMENTED
void compare_QUtf8StringView_QByteArray_data() { compare_data(); }
void compare_QUtf8StringView_QByteArray() { compare_impl<QUtf8StringView, QByteArray>(); }
void compare_QUtf8StringView_QByteArrayView_data() { compare_data(); }
void compare_QUtf8StringView_QByteArrayView() { compare_impl<QUtf8StringView, QByteArrayView>(); }
void compare_QUtf8StringView_const_char_star_data() { compare_data(); }
void compare_QUtf8StringView_const_char_star() { compare_impl<QUtf8StringView, const char *>(); }
-#endif
void compare_QLatin1String_QChar_data() { compare_data(false); }
void compare_QLatin1String_QChar() { compare_impl<QLatin1String, QChar>(); }
@@ -318,10 +314,8 @@ private Q_SLOTS:
void compare_QByteArrayView_QStringView_data() { compare_data(); }
void compare_QByteArrayView_QStringView() { compare_impl<QByteArrayView, QStringView>(); }
#endif
-#ifdef AMBIGUOUS_CALL
void compare_QByteArrayView_QUtf8StringView_data() { compare_data(); }
void compare_QByteArrayView_QUtf8StringView() { compare_impl<QByteArrayView, QUtf8StringView>(); }
-#endif
void compare_QByteArrayView_QLatin1String_data() { compare_data(); }
void compare_QByteArrayView_QLatin1String() { compare_impl<QByteArrayView, QLatin1String>(); }
#ifdef AMBIGUOUS_CALL