tst_QXmlStream: remove unneeded _ba UDLs
... and collapse adjacent C string literals.
Both QStringBuilder and non-QStringBuilder builds have no problem
resolving an operator+ for char[] and QByteArray, so there's no need
to turn the char[] into a QByteArray using the _ba UDL first.
It just causes pain because not all active branches support this UDL,
so remove, to bring this code in line with what the cherry-picks to
6.2 and 5.15 must needs had to use.
Amends 6326bec46a
.
Pick-to: 6.6 6.5 6.5.2
Change-Id: Id3d61483729c51c82f58b826efcc8fc7960c3ccd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
This commit is contained in:
parent
5654fbffd5
commit
3bc3b8d69a
@ -1837,19 +1837,19 @@ void tst_QXmlStream::test_fastScanName_data() const
|
||||
|
||||
// 4096 is the limit in QXmlStreamReaderPrivate::fastScanName()
|
||||
|
||||
QByteArray arr = "<a"_ba + ":" + QByteArray("b").repeated(4096 - 1);
|
||||
QByteArray arr = "<a:" + QByteArray("b").repeated(4096 - 1);
|
||||
QTest::newRow("data1") << arr << QXmlStreamReader::PrematureEndOfDocumentError;
|
||||
|
||||
arr = "<a"_ba + ":" + QByteArray("b").repeated(4096);
|
||||
arr = "<a:" + QByteArray("b").repeated(4096);
|
||||
QTest::newRow("data2") << arr << QXmlStreamReader::NotWellFormedError;
|
||||
|
||||
arr = "<"_ba + QByteArray("a").repeated(4000) + ":" + QByteArray("b").repeated(96);
|
||||
arr = "<" + QByteArray("a").repeated(4000) + ":" + QByteArray("b").repeated(96);
|
||||
QTest::newRow("data3") << arr << QXmlStreamReader::PrematureEndOfDocumentError;
|
||||
|
||||
arr = "<"_ba + QByteArray("a").repeated(4000) + ":" + QByteArray("b").repeated(96 + 1);
|
||||
arr = "<" + QByteArray("a").repeated(4000) + ":" + QByteArray("b").repeated(96 + 1);
|
||||
QTest::newRow("data4") << arr << QXmlStreamReader::NotWellFormedError;
|
||||
|
||||
arr = "<"_ba + QByteArray("a").repeated(4000 + 1) + ":" + QByteArray("b").repeated(96);
|
||||
arr = "<" + QByteArray("a").repeated(4000 + 1) + ":" + QByteArray("b").repeated(96);
|
||||
QTest::newRow("data5") << arr << QXmlStreamReader::NotWellFormedError;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user