Test the helper connection functions too

This commit is contained in:
Denis Blank 2017-03-01 00:15:27 +01:00
parent 22d13997df
commit 4fa5346476

View File

@ -47,6 +47,11 @@ TYPED_TEST(single_dimension_tests, is_logical_and_connectable) {
EXPECT_ASYNC_RESULT(std::move(chain), 1, 2, 3, 4, 5);
}
{
auto chain = cti::all_of(this->supply(1, 2), this->supply(3, 4));
EXPECT_ASYNC_RESULT(std::move(chain), 1, 2, 3, 4);
}
{
auto chain = this->supply(tag1{}) && this->supply(tag2{}, tag3{});
ASSERT_ASYNC_TYPES(std::move(chain), tag1, tag2, tag3);
@ -78,6 +83,11 @@ TYPED_TEST(single_dimension_tests, is_logical_or_connectable) {
EXPECT_ASYNC_RESULT(std::move(chain), 1, 2);
}
{
auto chain = cti::any_of(this->supply(1), this->supply(2), this->supply(3));
EXPECT_ASYNC_RESULT(std::move(chain), 1);
}
{
auto chain = this->supply(tag1{}, tag2{}) || this->supply(tag1{}, tag2{});
ASSERT_ASYNC_TYPES(std::move(chain), tag1, tag2);
@ -116,6 +126,11 @@ TYPED_TEST(single_dimension_tests, is_logical_seq_connectable) {
EXPECT_ASYNC_RESULT(std::move(chain), 1, 2);
}
{
auto chain = cti::seq_of(this->supply(1), this->supply(2), this->supply(3));
EXPECT_ASYNC_RESULT(std::move(chain), 1, 2, 3);
}
{
auto chain = this->supply(1, 2) >> this->supply(3, 4);
EXPECT_ASYNC_RESULT(std::move(chain), 1, 2, 3, 4);