summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qstring/tst_qstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/text/qstring/tst_qstring.cpp')
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp
index ad59025dfe..319d429c10 100644
--- a/tests/auto/corelib/text/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp
@@ -4822,7 +4822,8 @@ void tst_QString::capacity()
s2 = s1; // share again
s2.reserve( res * 2 );
QVERIFY( (int)s2.capacity() >= res * 2 );
- QVERIFY(s2.constData() != s1.constData());
+ if (res != 0) // can both point to QString::_empty when empty
+ QVERIFY(s2.constData() != s1.constData());
QCOMPARE( s2, s1 );
// don't share again -- s2 must be detached for squeeze() to do anything