test: minor changes

This commit is contained in:
Michele Caini
2024-12-18 17:13:55 +01:00
parent 60a707f9e4
commit 326bb9879d
2 changed files with 3 additions and 4 deletions

2
TODO
View File

@@ -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 :)

View File

@@ -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)>();