Fix strange capacity check in tst_QString::append_special_cases
We cannot rely on "QString a; a.insert(0, u'A');" to give a.capacity() >= 3, this is clearly an implementation detail. Changed the check to a meaningful one Task-number: QTBUG-87416 Change-Id: I2e017c1292d360e32b85b903361027485c08ea74 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
e69b81101c
commit
a17e05bf20
@ -2467,7 +2467,8 @@ void tst_QString::append_special_cases()
|
||||
{
|
||||
QString a;
|
||||
a.insert(0, QChar(u'A'));
|
||||
QVERIFY(a.capacity() >= 3);
|
||||
QCOMPARE(a.size(), 1);
|
||||
QVERIFY(a.capacity() > 0);
|
||||
a.append(QLatin1String("BC"));
|
||||
QCOMPARE(a, QLatin1String("ABC"));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user