From 3552cf48e8cc68ca2ffba684f6c3a24a2bb9c15f Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 21 Dec 2021 07:42:28 +0100 Subject: tst_QStringBuilder: verify a comment is actually misleading The construction of the byte array doesn't actually yield freeSpaceAtBegin() (anymore?), so the comment above it is misleading (and the test didn't manage to catch QTBUG-99330, either). Before removing the misleading test, verify that this assumption is actually correct across all platforms. Task-number: QTBUG-99330 Pick-to: 6.3 6.2 Change-Id: I2f497321abc26c4148ced5ac12a5880b9ff5ba9f Reviewed-by: Qt CI Bot Reviewed-by: Anton Kudryavtsev Reviewed-by: Sona Kurazyan --- .../auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/auto/corelib/text/qstringbuilder') diff --git a/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp index de5277ab44..65157e6be5 100644 --- a/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp +++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp @@ -386,6 +386,8 @@ void runScenario() byteArray.reserve(70); byteArray.insert(0, "multipart/"); byteArray.insert(byteArray.size(), "mixed"); + QEXPECT_FAIL("", "there's no freeSpaceAtBegin()?!", Continue); + QVERIFY(byteArray.data_ptr().freeSpaceAtBegin() > 0); byteArray += "; boundary=\"" P QByteArray(30, 'o') P '"'; QCOMPARE(byteArray, "multipart/mixed; boundary=\"oooooooooooooooooooooooooooooo\""); } -- cgit v1.2.3