Skip to content

Commit

Permalink
Add another broken test
Browse files Browse the repository at this point in the history
The previous "fix" just lies during constraint satisfaction--actually
trying to const-ref-connect a `when_all_range` sender will still break.
  • Loading branch information
ispeters committed Sep 4, 2024
1 parent 07916e0 commit 05c877f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/when_all_range_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,22 @@ TEST_F(WhenAllRangeTests, canNestInV2Scope) {
unifex::sync_wait(scope.complete());
}

TEST_F(WhenAllRangeTests, canConstRefConnect) {
using just_t = decltype(unifex::just(42));

const auto sender =
unifex::when_all_range(std::vector<just_t>{unifex::just(42)});

auto ret = unifex::sync_wait(sender);

// there should be a result
ASSERT_TRUE(ret.has_value());
// it should be a vector of length one
ASSERT_EQ(ret->size(), 1);
// the first element should be 42
EXPECT_EQ(ret->at(0), 42);
}

// TODO: Fix MSVC compilation error with any_unique
#ifndef _MSC_VER
TEST_F(WhenAllRangeTests, ErrorCancelsRest) {
Expand Down

0 comments on commit 05c877f

Please sign in to comment.