From fef80b8fe69d1ad13a045c0012fd445967108d02 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 18 May 2015 11:32:43 +0200 Subject: Tests: Minor refactorings and TemporaryCopiedDir check Change-Id: Ia509e2d7229fadca06791f537c462924c32b8add Reviewed-by: Christian Kandeler --- plugins/clangstaticanalyzer/clangstaticanalyzerunittests.cpp | 9 +++++---- 1 file 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("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 -- cgit v1.2.1