tst_QStringBuilder: add a check for self-assignment
Change-Id: I78094146bf534163af12d6e265276d987d5ce994 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
d37239aa41
commit
f72152381b
@ -93,6 +93,11 @@ void runScenario()
|
||||
r = special + string;
|
||||
QCOMPARE(r, QString(special P string));
|
||||
|
||||
// self-assignment:
|
||||
r = stringref.toString();
|
||||
r = achar + r;
|
||||
QCOMPARE(r, QString(achar P stringref));
|
||||
|
||||
#ifdef Q_COMPILER_UNICODE_STRINGS
|
||||
r = QStringLiteral(UNICODE_LITERAL);
|
||||
r = r Q QStringLiteral(UNICODE_LITERAL);
|
||||
|
Loading…
Reference in New Issue
Block a user