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:
Marc Mutz 2015-10-13 21:48:08 +02:00
parent d37239aa41
commit f72152381b

View File

@ -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);