tst_QFormDataBuilder: give \r\n a symbolic name

... CRLF, what else?

Change-Id: Ibefb83495c34034a6727a0eaa42d8b312e0594ac
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit aeb1b9b48746395fc6680aa3fdda3469826b7ae8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2024-06-18 23:52:20 +02:00 committed by Qt Cherry-pick Bot
parent df6a26d9f0
commit a8f7a59b07

View File

@ -22,6 +22,8 @@
using namespace Qt::StringLiterals;
const auto CRLF = "\r\n"_ba;
Q_NEVER_INLINE static QByteArray
serialized_impl([[maybe_unused]] qxp::function_ref<QFormDataBuilder &(QFormDataBuilder &)> operations)
{
@ -81,10 +83,10 @@ private Q_SLOTS:
void tst_QFormDataBuilder::checkBodyPartsAreEquivalent(QByteArrayView expected, QByteArrayView actual)
{
qsizetype expectedCrlfPos = expected.indexOf("\r\n");
qsizetype expectedCrlfPos = expected.indexOf(CRLF);
qsizetype expectedBoundaryPos = expected.lastIndexOf("--boundary_.oOo.");
qsizetype actualCrlfPos = actual.indexOf("\r\n");
qsizetype actualCrlfPos = actual.indexOf(CRLF);
qsizetype actualBoundaryPos = actual.lastIndexOf("--boundary_.oOo.");
qsizetype start = expectedCrlfPos + 2;