Skip to content

Commit

Permalink
refactor: rename convert_test_expectations to slice_test_expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
DNKpp committed Oct 3, 2023
1 parent 0ffc66f commit 553670d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tests/graph/BreadthFirstSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ TEMPLATE_TEST_CASE(
)
{
using Node = sg::CommonBasicNode<std::string>;
const auto& [expected, origin] = GENERATE(from_range(convert_test_expectations(testResults, toCommonBasicNode)));
const auto& [expected, origin] = GENERATE(from_range(slice_test_expectations(testResults, toCommonBasicNode)));

sg::dfs::Range<TestType, Node> range{origin, std::tuple{TestType{}}, std::tuple{}, std::tuple{}, std::tuple{}, std::tuple{}};
STATIC_CHECK(std::ranges::input_range<decltype(range)>);
Expand All @@ -62,7 +62,7 @@ TEMPLATE_TEST_CASE(
)
{
using Node = sg::DepthNodeDecorator<sg::CommonBasicNode<std::string>>;
const auto& [expected, origin] = GENERATE(from_range(convert_test_expectations(testResults, toDepthBasicNode)));
const auto& [expected, origin] = GENERATE(from_range(slice_test_expectations(testResults, toDepthBasicNode)));

sg::dfs::Range<TestType, Node> range{origin, std::tuple{TestType{}}, std::tuple{}, std::tuple{}, std::tuple{}, std::tuple{}};
STATIC_CHECK(std::ranges::input_range<decltype(range)>);
Expand All @@ -78,7 +78,7 @@ TEMPLATE_TEST_CASE(
)
{
using Node = sg::PredecessorNodeDecorator<sg::CommonBasicNode<std::string>>;
const auto& [expected, origin] = GENERATE(from_range(convert_test_expectations(testResults, toPredecessorBasicNode)));
const auto& [expected, origin] = GENERATE(from_range(slice_test_expectations(testResults, toPredecessorBasicNode)));

sg::dfs::Range<TestType, Node> range{origin, std::tuple{TestType{}}, std::tuple{}, std::tuple{}, std::tuple{}, std::tuple{}};
STATIC_CHECK(std::ranges::input_range<decltype(range)>);
Expand Down
2 changes: 1 addition & 1 deletion tests/graph/Defines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ constexpr auto buffer_nodes(Range& range)
}

template <std::ranges::input_range Range, typename Transform>
constexpr auto convert_test_expectations(const Range& range, Transform transform)
constexpr auto slice_test_expectations(const Range& range, Transform transform)
{
using TargetNode = std::invoke_result_t<
Transform,
Expand Down
6 changes: 3 additions & 3 deletions tests/graph/DepthFirstSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ TEMPLATE_TEST_CASE(
)
{
using Node = sg::CommonBasicNode<std::string>;
const auto& [expected, origin] = GENERATE(from_range(convert_test_expectations(testResults, toCommonBasicNode)));
const auto& [expected, origin] = GENERATE(from_range(slice_test_expectations(testResults, toCommonBasicNode)));

sg::dfs::Range<TestType, Node> range{origin, std::tuple{TestType{}}, std::tuple{}, std::tuple{}, std::tuple{}, std::tuple{}};
STATIC_CHECK(std::ranges::input_range<decltype(range)>);
Expand All @@ -63,7 +63,7 @@ TEMPLATE_TEST_CASE(
)
{
using Node = sg::DepthNodeDecorator<sg::CommonBasicNode<std::string>>;
const auto& [expected, origin] = GENERATE(from_range(convert_test_expectations(testResults, toDepthBasicNode)));
const auto& [expected, origin] = GENERATE(from_range(slice_test_expectations(testResults, toDepthBasicNode)));

sg::dfs::Range<TestType, Node> range{origin, std::tuple{TestType{}}, std::tuple{}, std::tuple{}, std::tuple{}, std::tuple{}};
STATIC_CHECK(std::ranges::input_range<decltype(range)>);
Expand All @@ -79,7 +79,7 @@ TEMPLATE_TEST_CASE(
)
{
using Node = sg::PredecessorNodeDecorator<sg::CommonBasicNode<std::string>>;
const auto& [expected, origin] = GENERATE(from_range(convert_test_expectations(testResults, toPredecessorBasicNode)));
const auto& [expected, origin] = GENERATE(from_range(slice_test_expectations(testResults, toPredecessorBasicNode)));

sg::dfs::Range<TestType, Node> range{origin, std::tuple{TestType{}}, std::tuple{}, std::tuple{}, std::tuple{}, std::tuple{}};
STATIC_CHECK(std::ranges::input_range<decltype(range)>);
Expand Down

0 comments on commit 553670d

Please sign in to comment.