blob: 7148f16b48ba297ee1c76f8c84d020b3ac418ee6 (
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
|
// Copyright (C) 2022 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 <cppeditor/cpptoolstestcase.h>
#include <QObject>
#include <QScopedPointer>
#include <QString>
namespace Utils { class FilePath; }
namespace ClangCodeModel::Internal {
class ClangFixIt;
namespace Tests {
class ClangFixItTest : public QObject
{
Q_OBJECT
private slots:
void init();
void testAppendSemicolon();
void testComparisonVersusAssignmentChooseComparison();
void testComparisonVersusAssignmentChooseParentheses();
void testDescription();
private:
Utils::FilePath semicolonFilePath() const;
Utils::FilePath compareFilePath() const;
QString fileContent(const QByteArray &relFilePath) const;
ClangFixIt semicolonFixIt() const;
private:
QScopedPointer<CppEditor::Tests::TemporaryCopiedDir> m_dataDir;
};
} //namespace Tests
} // namespace ClangCodeModel::Internal
|