@@ -36,7 +36,7 @@ template <typename InType, typename OutType, typename TestType = void>
36
36
// / @tparam TestType Type of the test case or parameter.
37
37
class BaseRunFuncTests : public ::testing::TestWithParam<FuncTestParam<InType, OutType, TestType>> {
38
38
public:
39
- virtual bool CheckTestOutputData (OutType& output_data) = 0;
39
+ virtual bool CheckTestOutputData (OutType & output_data) = 0;
40
40
// / @brief Provides input data for the task.
41
41
// / @return Initialized input data.
42
42
virtual InType GetTestInputData () = 0;
@@ -48,7 +48,7 @@ class BaseRunFuncTests : public ::testing::TestWithParam<FuncTestParam<InType, O
48
48
}
49
49
50
50
template <typename Derived>
51
- static std::string PrintFuncTestName (const GTestFuncParam<InType, OutType, TestType>& info) {
51
+ static std::string PrintFuncTestName (const GTestFuncParam<InType, OutType, TestType> & info) {
52
52
RequireStaticInterface<Derived>();
53
53
TestType test_param = std::get<static_cast <std::size_t >(ppc::util::GTestParamIndex::kTestParams )>(info.param );
54
54
return std::get<static_cast <std::size_t >(GTestParamIndex::kNameTest )>(info.param ) + " _" +
@@ -57,7 +57,7 @@ class BaseRunFuncTests : public ::testing::TestWithParam<FuncTestParam<InType, O
57
57
58
58
protected:
59
59
void ExecuteTest (FuncTestParam<InType, OutType, TestType> test_param) {
60
- const std::string& test_name = std::get<static_cast <std::size_t >(GTestParamIndex::kNameTest )>(test_param);
60
+ const std::string & test_name = std::get<static_cast <std::size_t >(GTestParamIndex::kNameTest )>(test_param);
61
61
62
62
ValidateTestName (test_name);
63
63
@@ -73,24 +73,24 @@ class BaseRunFuncTests : public ::testing::TestWithParam<FuncTestParam<InType, O
73
73
InitializeAndRunTask (test_param);
74
74
}
75
75
76
- void ValidateTestName (const std::string& test_name) {
76
+ void ValidateTestName (const std::string & test_name) {
77
77
EXPECT_FALSE (test_name.find (" unknown" ) != std::string::npos);
78
78
}
79
79
80
- bool IsTestDisabled (const std::string& test_name) {
80
+ bool IsTestDisabled (const std::string & test_name) {
81
81
return test_name.find (" disabled" ) != std::string::npos;
82
82
}
83
83
84
- bool ShouldSkipNonMpiTask (const std::string& test_name) {
85
- auto contains_substring = [&](const std::string& substring) {
84
+ bool ShouldSkipNonMpiTask (const std::string & test_name) {
85
+ auto contains_substring = [&](const std::string & substring) {
86
86
return test_name.find (substring) != std::string::npos;
87
87
};
88
88
89
89
return !ppc::util::IsUnderMpirun () && (contains_substring (" _all" ) || contains_substring (" _mpi" ));
90
90
}
91
91
92
92
// / @brief Initializes task instance and runs it through the full pipeline.
93
- void InitializeAndRunTask (const FuncTestParam<InType, OutType, TestType>& test_param) {
93
+ void InitializeAndRunTask (const FuncTestParam<InType, OutType, TestType> & test_param) {
94
94
task_ = std::get<static_cast <std::size_t >(GTestParamIndex::kTaskGetter )>(test_param)(GetTestInputData ());
95
95
ExecuteTaskPipeline ();
96
96
}
@@ -110,18 +110,18 @@ class BaseRunFuncTests : public ::testing::TestWithParam<FuncTestParam<InType, O
110
110
};
111
111
112
112
template <typename Tuple, std::size_t ... Is>
113
- auto ExpandToValuesImpl (const Tuple& t, std::index_sequence<Is...> /* unused*/ ) {
113
+ auto ExpandToValuesImpl (const Tuple & t, std::index_sequence<Is...> /* unused*/ ) {
114
114
return ::testing::Values (std::get<Is>(t)...);
115
115
}
116
116
117
117
template <typename Tuple>
118
- auto ExpandToValues (const Tuple& t) {
118
+ auto ExpandToValues (const Tuple & t) {
119
119
constexpr std::size_t kN = std::tuple_size_v<Tuple>;
120
120
return ExpandToValuesImpl (t, std::make_index_sequence<kN >{});
121
121
}
122
122
123
123
template <typename Task, typename InType, typename SizesContainer, std::size_t ... Is>
124
- auto GenTaskTuplesImpl (const SizesContainer& sizes, const std::string& settings_path,
124
+ auto GenTaskTuplesImpl (const SizesContainer & sizes, const std::string & settings_path,
125
125
std::index_sequence<Is...> /* unused*/ ) {
126
126
return std::make_tuple (std::make_tuple (ppc::task::TaskGetter<Task, InType>,
127
127
std::string (GetNamespace<Task>()) + " _" +
@@ -130,13 +130,13 @@ auto GenTaskTuplesImpl(const SizesContainer& sizes, const std::string& settings_
130
130
}
131
131
132
132
template <typename Task, typename InType, typename SizesContainer>
133
- auto TaskListGenerator (const SizesContainer& sizes, const std::string& settings_path) {
133
+ auto TaskListGenerator (const SizesContainer & sizes, const std::string & settings_path) {
134
134
return GenTaskTuplesImpl<Task, InType>(sizes, settings_path,
135
135
std::make_index_sequence<std::tuple_size_v<std::decay_t <SizesContainer>>>{});
136
136
}
137
137
138
138
template <typename Task, typename InType, typename SizesContainer>
139
- constexpr auto AddFuncTask (const SizesContainer& sizes, const std::string& settings_path) {
139
+ constexpr auto AddFuncTask (const SizesContainer & sizes, const std::string & settings_path) {
140
140
return TaskListGenerator<Task, InType>(sizes, settings_path);
141
141
}
142
142
0 commit comments