Skip to content

Commit

Permalink
[oneDPL][ranges][zip_view][test] + EXPECT_TRUE usage
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDvorskiy committed Nov 19, 2024
1 parent 6fe7f65 commit 0e35be1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel_api/ranges/std_ranges_zip_view.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ main()

std::sort(zip_view_sort.begin(), zip_view_sort.begin() + max_n, [](const auto& val1, const auto& val2) { return std::get<0>(val1) > std::get<0>(val2); });
for(int i = 0; i < max_n; ++i)
assert(std::get<0>(zip_view_sort[i]) == max_n - 1 - i);
EXPECT_TRUE(std::get<0>(zip_view_sort[i]) == max_n - 1 - i, "Wrong effect for std::sort with zip_view.");

std::ranges::sort(zip_view_sort, std::less{}, [](auto&& val) { return std::get<0>(val); });
for(int i = 0; i < max_n; ++i)
assert(std::get<0>(zip_view_sort[i]) == i);
EXPECT_TRUE(std::get<0>(zip_view_sort[i]) == i, "Wrong effect for std::ranges::sort with zip_view.");

static_assert(std::ranges::random_access_range<decltype(zip_view_sort)>);
static_assert(std::random_access_iterator<decltype(zip_view_sort.begin())>);
Expand Down

0 comments on commit 0e35be1

Please sign in to comment.