aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/compilationdatabaseprojectmanager/compilationdatabasetests.h
blob: a7fa9de01ac8986594c711de006b860dcca5e6dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#pragma once

#include <QObject>
#include <memory>

namespace CppEditor { namespace Tests { class TemporaryCopiedDir; } }

namespace CompilationDatabaseProjectManager {
namespace Internal {

class CompilationDatabaseTests : public QObject
{
    Q_OBJECT
public:
    explicit CompilationDatabaseTests(QObject *parent = nullptr);
    ~CompilationDatabaseTests();

private slots:
    void initTestCase();
    void cleanupTestCase();
    void testProject();
    void testProject_data();
    void testFilterEmptyFlags();
    void testFilterFromFilename();
    void testFilterArguments();
    void testSplitFlags();
    void testSplitFlagsWithEscapedQuotes();
    void testFilterCommand();
    void testFileKindDifferentFromExtension();
    void testFileKindDifferentFromExtension2();
    void testSkipOutputFiles();

private:
    void addTestRow(const QByteArray &relativeFilePath);

    std::unique_ptr<CppEditor::Tests::TemporaryCopiedDir> m_tmpDir;
};

} // namespace Internal
} // namespace CompilationDatabaseProjectManager