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 <qt_ci_bot@qt-project.org>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
bb10
Marc Mutz 2021-12-21 07:42:28 +01:00
parent c47c98ea2b
commit 3552cf48e8
1 changed files with 2 additions and 0 deletions

View File

@ -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\"");
}