Skip to content

Commit

Permalink
test: add IterableTraverser trait tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DNKpp committed Oct 5, 2023
1 parent ef0ecee commit b08cd14
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/graph/Traverse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,11 @@ TEMPLATE_TEST_CASE(
STATIC_REQUIRE(!requires{std::declval<TestType&&>().begin(); });
STATIC_REQUIRE(!requires{std::declval<const TestType&&>().begin(); });
}

TEST_CASE("graph::IterableTraverser can be used with std::ranges traits.", "[graph][graph::traverser]")
{
using Range = sg::IterableTraverser<TraverserMock<DefaultNode>>;

STATIC_REQUIRE(std::same_as<DefaultNode, std::ranges::range_value_t<Range>>);
STATIC_REQUIRE(std::same_as<const DefaultNode&, std::ranges::range_reference_t<Range>>);
}

0 comments on commit b08cd14

Please sign in to comment.