Skip to content

Commit 4e3bbf5

Browse files
author
crn4t
committed
refactor: align naming with lexicographical_check style - remove PrintTestParam, rename kTestParam to kTests, remove custom test names
1 parent 69179fc commit 4e3bbf5

File tree

1 file changed

+4
-14
lines changed
  • tasks/egashin_k_iterative_simple/tests/functional

1 file changed

+4
-14
lines changed

tasks/egashin_k_iterative_simple/tests/functional/main.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
namespace egashin_k_iterative_simple {
1818

1919
class EgashinKIterativeSimpleFuncTest : public ppc::util::BaseRunFuncTests<InType, OutType, TestType> {
20-
public:
21-
static std::string PrintTestParam(const TestType &test_param) {
22-
return std::get<2>(test_param);
23-
}
24-
2520
protected:
2621
void SetUp() override {
2722
TestType param = std::get<static_cast<std::size_t>(ppc::util::GTestParamIndex::kTestParams)>(GetParam());
@@ -78,7 +73,7 @@ TEST_P(EgashinKIterativeSimpleFuncTest, IterativeMethod) {
7873
ExecuteTest(GetParam());
7974
}
8075

81-
const std::array<TestType, 5> kTestParam = {
76+
const std::array<TestType, 5> kTests = {
8277
CreateTestCase({{2.0, 1.0}, {1.0, 2.0}}, {3.0, 3.0}, {0.0, 0.0}, 1e-6, 1000, {1.0, 1.0}, "Diag2x2Basic"),
8378
CreateTestCase({{4.0, 1.0, 0.0}, {1.0, 4.0, 1.0}, {0.0, 1.0, 4.0}}, {5.0, 6.0, 5.0}, {0.0, 0.0, 0.0}, 1e-6, 1000,
8479
{1.0, 1.0, 1.0}, "Tridiag3x3"),
@@ -87,15 +82,10 @@ const std::array<TestType, 5> kTestParam = {
8782
CreateTestCase({{10.0, 1.0}, {1.0, 10.0}}, {11.0, 11.0}, {0.0, 0.0}, 1e-6, 1000, {1.0, 1.0}, "Diag2x2Dominant")};
8883

8984
const auto kTaskParams =
90-
std::tuple_cat(ppc::util::AddFuncTask<TestTaskSEQ, InType>(kTestParam, PPC_SETTINGS_egashin_k_iterative_simple),
91-
ppc::util::AddFuncTask<TestTaskMPI, InType>(kTestParam, PPC_SETTINGS_egashin_k_iterative_simple));
92-
93-
const auto kGtestValues = ppc::util::ExpandToValues(kTaskParams);
94-
95-
const auto kFuncTestName = EgashinKIterativeSimpleFuncTest::PrintFuncTestName<EgashinKIterativeSimpleFuncTest>;
85+
std::tuple_cat(ppc::util::AddFuncTask<TestTaskSEQ, InType>(kTests, PPC_SETTINGS_egashin_k_iterative_simple),
86+
ppc::util::AddFuncTask<TestTaskMPI, InType>(kTests, PPC_SETTINGS_egashin_k_iterative_simple));
9687

97-
// NOLINTNEXTLINE
98-
INSTANTIATE_TEST_SUITE_P(EgashinKIterativeSimpleFunc, EgashinKIterativeSimpleFuncTest, kGtestValues, kFuncTestName);
88+
INSTANTIATE_TEST_SUITE_P(EgashinKIterativeSimpleFunc, EgashinKIterativeSimpleFuncTest, ppc::util::ExpandToValues(kTaskParams));
9989

10090
} // namespace
10191

0 commit comments

Comments
 (0)