From 4fa5346476bf519a8eca1f1f9c825720d98de68f Mon Sep 17 00:00:00 2001 From: Denis Blank Date: Wed, 1 Mar 2017 00:15:27 +0100 Subject: [PATCH] Test the helper connection functions too --- test/unit-test/test-continuable-connection.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/unit-test/test-continuable-connection.cpp b/test/unit-test/test-continuable-connection.cpp index 96083ea..2f27b8e 100644 --- a/test/unit-test/test-continuable-connection.cpp +++ b/test/unit-test/test-continuable-connection.cpp @@ -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);