Skip to content

Commit

Permalink
test: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Dec 18, 2024
1 parent 60a707f commit 326bb98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ TODO:
* any cdynamic to support const ownership construction
* track meta context on meta elements
* safer meta_data/meta_func (no blind indirections)
* review tests, write doc for view::join and decide whether I like it or prefer operator| for consistency :)
* write doc for view::join and decide whether I like it or prefer operator| for consistency :)
5 changes: 2 additions & 3 deletions test/entt/entity/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1539,11 +1539,10 @@ TEST(View, Pipe) {
entt::basic_view view1{std::forward_as_tuple(std::get<0>(storage)), std::forward_as_tuple(std::as_const(std::get<1>(storage)))};
entt::basic_view view2{std::forward_as_tuple(std::as_const(std::get<0>(storage))), std::forward_as_tuple(std::get<4>(storage))};
entt::basic_view view3{std::get<2>(storage)};
entt::basic_view view4{std::get<3>(storage)};
entt::basic_view view5{std::get<3>(std::as_const(storage))};
entt::basic_view view4{std::as_const(std::get<3>(storage))};

testing::StaticAssertTypeEq<decltype(view1.join(std::get<2>(storage))), decltype(view1 | view3)>();
testing::StaticAssertTypeEq<decltype(view1.join(std::get<3>(std::as_const(storage)))), decltype(view1 | view5)>();
testing::StaticAssertTypeEq<decltype(view1.join(std::get<3>(std::as_const(storage)))), decltype(view1 | view4)>();

testing::StaticAssertTypeEq<entt::basic_view<entt::get_t<entt::storage<int>, const entt::storage<int>>, entt::exclude_t<const entt::storage<double>, entt::storage<float>>>, decltype(view1 | view2)>();
testing::StaticAssertTypeEq<entt::basic_view<entt::get_t<const entt::storage<int>, entt::storage<int>>, entt::exclude_t<entt::storage<float>, const entt::storage<double>>>, decltype(view2 | view1)>();
Expand Down

0 comments on commit 326bb98

Please sign in to comment.