forked from qt-creator/qt-creator
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:
@@ -1,6 +1,5 @@
|
||||
import QtQuick 2.0
|
||||
|
||||
|
||||
/* Comment 1
|
||||
This is a multiline comment. */
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user