QmlJS: Fix reformatter test

Apparently the reformatting truncates any sequence of multiple empty
lines into one. That seems to be by design. Therefore, remove one of the
two adjacent empty lines from commments.qml. Also, don't invert the
actual and expected values in the test code.

Change-Id: Id87c6fa0b2c7a03884d42d109b7d55f5040a927a
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Ulf Hermann
2018-09-11 15:25:03 +02:00
parent ca84a51f86
commit 2b582ed455
2 changed files with 1 additions and 2 deletions

View File

@@ -1,6 +1,5 @@
import QtQuick 2.0
/* Comment 1
This is a multiline comment. */

View File

@@ -99,7 +99,7 @@ void tst_Reformatter::test()
const QString &newLinee = newLines.at(i);
if (sourceLine.trimmed().isEmpty() && newLinee.trimmed().isEmpty())
continue;
bool fail = !QCOMPARE_NOEXIT(sourceLine, newLinee);
bool fail = !QCOMPARE_NOEXIT(newLinee, sourceLine);
if (fail) {
qDebug() << "in line" << (i + 1);
return;