forked from qt-creator/qt-creator
ClangTools: Sanitize ClangToolsUnitTests
This fixes the currently failing tests ClangToolsUnitTests::testProject(simple.qbs) ClangToolsUnitTests::testProject(simple.pro) which produce more diagnostics now due to the upgrade to clang 8. Sanitize the test by specifying exactly the tidy/clazy checks we are interested in. This should avoid maintenance on clang upgraded (pulling in new checks that will fail the test). While at it, fix writing the settings for the tests, which worked by accident so far. Change-Id: If8bf5076ad7141faa93eced611334ac609f0cf92 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -27,7 +27,10 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace CppTools { namespace Tests { class TemporaryCopiedDir; } }
|
||||
namespace CppTools {
|
||||
class ClangDiagnosticConfig;
|
||||
namespace Tests { class TemporaryCopiedDir; }
|
||||
} // namespace CppTools
|
||||
|
||||
namespace ClangTools {
|
||||
namespace Internal {
|
||||
@@ -46,7 +49,9 @@ private slots:
|
||||
void testProject_data();
|
||||
|
||||
private:
|
||||
void addTestRow(const QByteArray &relativeFilePath, int expectedDiagCount);
|
||||
void addTestRow(const QByteArray &relativeFilePath,
|
||||
int expectedDiagCount,
|
||||
const CppTools::ClangDiagnosticConfig &diagnosticConfig);
|
||||
|
||||
private:
|
||||
CppTools::Tests::TemporaryCopiedDir *m_tmpDir = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user