summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-05-18 11:32:43 +0200
committerNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-05-18 14:59:57 +0300
commitfef80b8fe69d1ad13a045c0012fd445967108d02 (patch)
tree522e68afa83f1fe2fe69ff9e435bef1040ccb813
parentd5956e92ed3eed6dd0d54f7a65a246f4884b0080 (diff)
downloadqt-creator-fef80b8fe69d1ad13a045c0012fd445967108d02.tar.gz
Tests: Minor refactorings and TemporaryCopiedDir check
Change-Id: Ia509e2d7229fadca06791f537c462924c32b8add Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
-rw-r--r--plugins/clangstaticanalyzer/clangstaticanalyzerunittests.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/clangstaticanalyzer/clangstaticanalyzerunittests.cpp b/plugins/clangstaticanalyzer/clangstaticanalyzerunittests.cpp
index 62fb91351b..e375a0f646 100644
--- a/plugins/clangstaticanalyzer/clangstaticanalyzerunittests.cpp
+++ b/plugins/clangstaticanalyzer/clangstaticanalyzerunittests.cpp
@@ -66,6 +66,7 @@ void ClangStaticAnalyzerUnitTests::initTestCase()
QSKIP("No clang suitable for analyzing found");
m_tmpDir = new CppTools::Tests::TemporaryCopiedDir(QLatin1String(":/unit-tests"));
+ QVERIFY(m_tmpDir->isValid());
}
void ClangStaticAnalyzerUnitTests::cleanupTestCase()
@@ -96,14 +97,14 @@ void ClangStaticAnalyzerUnitTests::testProject_data()
QTest::addColumn<int>("expectedDiagCount");
QTest::newRow("simple qbs project")
- << QString(m_tmpDir->path() + QLatin1String("/simple/simple.qbs")) << 1;
+ << QString(m_tmpDir->absolutePath("simple/simple.qbs")) << 1;
QTest::newRow("simple qmake project")
- << QString(m_tmpDir->path() + QLatin1String("/simple/simple.pro")) << 1;
+ << QString(m_tmpDir->absolutePath("simple/simple.pro")) << 1;
QTest::newRow("qt-widgets-app qbs project")
- << QString(m_tmpDir->path() + QLatin1String("/qt-widgets-app/qt-widgets-app.qbs")) << 0;
+ << QString(m_tmpDir->absolutePath("qt-widgets-app/qt-widgets-app.qbs")) << 0;
QTest::newRow("qt-widgets-app qmake project")
- << QString(m_tmpDir->path() + QLatin1String("/qt-widgets-app/qt-widgets-app.pro")) << 0;
+ << QString(m_tmpDir->absolutePath("qt-widgets-app/qt-widgets-app.pro")) << 0;
}
} // namespace Internal