diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-11-29 12:59:51 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-11-29 13:36:14 +0100 |
commit | 29c9f8080d2e2ad6ad9573612b0ea171c22d737a (patch) | |
tree | 7d811167b3992eb5c35f09599c27faa8e225f2d6 /tests/auto | |
parent | ba4c43421126c02e34d5cf3ed25bb290c79e6343 (diff) | |
parent | 9eb66a806f098b84c22654da5aeb62a9db8e8c59 (diff) |
Merge remote-tracking branch 'origin/4.8'
Conflicts:
src/plugins/android/androidrunnerworker.cpp
Change-Id: Ibd8b99435365fb7e7d488313fd1d2b3a75adad1b
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qml/qmlprojectmanager/fileformat/tst_fileformat.cpp | 5 | ||||
-rw-r--r-- | tests/auto/qml/reformatter/tst_reformatter.cpp | 8 |
3 files changed, 13 insertions, 2 deletions
diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp index 9b5762f3da9..4334e90aa64 100644 --- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp @@ -8228,6 +8228,8 @@ static void checkNode(QmlJS::SimpleReaderNode::Ptr node, TestRewriterView *view) void tst_TestCore::writeAnnotations() { + QSKIP("We have to improve handling of emtpy lines.", SkipAll); + const QLatin1String qmlCode("\n" "import QtQuick 2.1\n" "\n" diff --git a/tests/auto/qml/qmlprojectmanager/fileformat/tst_fileformat.cpp b/tests/auto/qml/qmlprojectmanager/fileformat/tst_fileformat.cpp index 8c60c1c498d..bca2e8d7a88 100644 --- a/tests/auto/qml/qmlprojectmanager/fileformat/tst_fileformat.cpp +++ b/tests/auto/qml/qmlprojectmanager/fileformat/tst_fileformat.cpp @@ -223,8 +223,9 @@ void tst_FileFormat::testLibraryPaths() project->setSourceDirectory(testDataDir); - QStringList expectedPaths(QStringList() << SRCDIR "/otherLibrary" - << SRCDIR "/data/library"); + const QDir base(testDataDir); + const QStringList expectedPaths({base.relativeFilePath(SRCDIR "/otherLibrary"), + base.relativeFilePath(SRCDIR "/data/library")}); qDebug() << expectedPaths << project->importPaths(); QCOMPARE(project->importPaths().toSet(), expectedPaths.toSet()); delete project; diff --git a/tests/auto/qml/reformatter/tst_reformatter.cpp b/tests/auto/qml/reformatter/tst_reformatter.cpp index f3164f440e3..64506195c4a 100644 --- a/tests/auto/qml/reformatter/tst_reformatter.cpp +++ b/tests/auto/qml/reformatter/tst_reformatter.cpp @@ -93,10 +93,18 @@ void tst_Reformatter::test() // compare line by line int commonLines = qMin(newLines.size(), sourceLines.size()); + bool insideMultiLineComment = false; for (int i = 0; i < commonLines; ++i) { // names intentional to make 'Actual (sourceLine): ...\nExpected (newLinee): ...' line up const QString &sourceLine = sourceLines.at(i); const QString &newLinee = newLines.at(i); + if (!insideMultiLineComment && sourceLine.trimmed().startsWith("/*")) { + insideMultiLineComment = true; + sourceLines.insert(i, "\n"); + continue; + } + if (sourceLine.trimmed().endsWith("*/")) + insideMultiLineComment = false; if (sourceLine.trimmed().isEmpty() && newLinee.trimmed().isEmpty()) continue; bool fail = !QCOMPARE_NOEXIT(newLinee, sourceLine); |