summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qstringbuilder
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2021-12-21 07:42:28 +0100
committerMarc Mutz <marc.mutz@qt.io>2021-12-21 22:56:00 +0100
commit3552cf48e8cc68ca2ffba684f6c3a24a2bb9c15f (patch)
tree1212931f78e0dec157c15415968a82eb2f3337b3 /tests/auto/corelib/text/qstringbuilder
parentc47c98ea2b8ec9e8bda51d86f3168bba28c3291a (diff)
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>
Diffstat (limited to 'tests/auto/corelib/text/qstringbuilder')
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp2
1 files changed, 2 insertions, 0 deletions
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\"");
}