diff options
author | Vladimir Belyavsky <belyavskyv@gmail.com> | 2023-06-07 16:38:07 +0300 |
---|---|---|
committer | Vladimir Belyavsky <belyavskyv@gmail.com> | 2023-06-09 09:55:25 +0300 |
commit | 6b8106383228785bf7a184d01f8c9692dd91e6c0 (patch) | |
tree | 9e3c6c01ed80303e590ef1264e8d3a35342448c3 /tests/auto/corelib/text/qstringbuilder | |
parent | c7b925757f9b55924b788a2f08d777baa0e63250 (diff) |
QStringBuilder: remove QString/QByteArray specializations
This is an improved version of the previous attempt to remove
this 3c6c3eccd1f91bd1ae0a518318ef264f8eff63f5. Now we also take
into account that concatenation of 2 null stings must also produce
null string as a result.
Change-Id: I39c270552839b056247c1cce334cef4fa8f1cfdd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/text/qstringbuilder')
-rw-r--r-- | tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp index dc2aa9eb39..a547205460 100644 --- a/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp +++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp @@ -78,7 +78,7 @@ void checkItWorksWithFreeSpaceAtBegin(const String &chunk, const Separator &sepa } template <typename String> -void checkNullVsEmpty(const String &empty, const char *failureReason = nullptr) +void checkNullVsEmpty(const String &empty) { String a; String b; @@ -92,12 +92,10 @@ void checkNullVsEmpty(const String &empty, const char *failureReason = nullptr) QVERIFY(!d.isNull()); result = a P d; QVERIFY(result.isEmpty()); - if (failureReason) - QEXPECT_FAIL("", failureReason, Continue); QVERIFY(!result.isNull()); result = a P a P a; - QVERIFY(!result.isNull()); + QVERIFY(result.isNull()); } void runScenario() @@ -381,7 +379,7 @@ void runScenario() // null vs. empty checkNullVsEmpty(QStringLiteral("")); - checkNullVsEmpty(QByteArrayLiteral(""), "QTBUG-114238: inconsistent isEmpty/isNull between QString and QByteArray concatenation"); + checkNullVsEmpty(QByteArrayLiteral("")); checkItWorksWithFreeSpaceAtBegin(QByteArray(UTF8_LITERAL), "1234"); if (QTest::currentTestFailed()) |