aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppsourceprocessertesthelper.cpp
blob: fea6cfdd47737b6f2d2b47b55e06589def5fcb25 (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
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include "cppsourceprocessertesthelper.h"

#include <utils/filepath.h>

using namespace Utils;

namespace CppEditor::Tests::Internal::TestIncludePaths {

FilePath includeBaseDirectory()
{
    return FilePath::fromUserInput(QLatin1String(SRCDIR)
            + QLatin1String("/../../../tests/auto/cplusplus/preprocessor/data/include-data"));
}

FilePath globalQtCoreIncludePath()
{
    return includeBaseDirectory() / "QtCore";
}

FilePath globalIncludePath()
{
    return includeBaseDirectory() / "global";
}

FilePath directoryOfTestFile()
{
    return includeBaseDirectory() / "local";
}

FilePath testFilePath(const QString &fileName)
{
    return directoryOfTestFile() / fileName;
}

} // CppEditor::Tests::Internal::TestIncludePaths