-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathprj_test_ficture.hpp
More file actions
71 lines (49 loc) · 1.62 KB
/
prj_test_ficture.hpp
File metadata and controls
71 lines (49 loc) · 1.62 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#pragma once
#include "test_tools/boost_predicate_wrapper.hpp"
#include <std_fs>
#include <stdfwd/vector>
#include <memory>
//------------------------------------------------------------------------------
namespace project
{
class Project;
class ProjectAccessor;
}
//------------------------------------------------------------------------------
namespace project::test
{
//------------------------------------------------------------------------------
class ProjectFixture
{
public:
using Strings = stdfwd::vector< std::string >;
using Path = stdfs::path;
using Paths = stdfwd::vector< Path >;
ProjectFixture();
~ProjectFixture();
Project & getProject();
const Project & getProject() const;
void setProjectDir( const Path & _path );
const Path & getProjectDir() const;
void addIncludeDirs( const Strings & _dirs );
Paths getIncludeDirs() const;
void addIgnoreDirs( const Strings & _dirs );
bool isIgnoreDir( std::string_view _path );
Paths getIgnoreDirs() const;
void addFileFilter( std::string_view _filter );
bool isIgnoredFile( std::string_view _path ) const;
void addCppExtensions( const Strings & _ext );
bool isExistsCppExtension( std::string_view _ext ) const;
void changeAllPathsToAbsolute();
Path toAbsolutePath( const Path & _path );
static Path getCurrentPath();
static std::string toString( const Strings & _strings );
static Paths toPaths( const Strings & _strings );
private:
ProjectAccessor & getProjectAccessor();
private:
std::unique_ptr< ProjectAccessor > m_accessor;
std::unique_ptr< Project > m_project;
};
//------------------------------------------------------------------------------
}