Simplify assert_async_binary_validation

This commit is contained in:
Denis Blank 2017-10-03 18:39:35 +02:00
parent 342d08ab1d
commit b488d88370
2 changed files with 8 additions and 12 deletions

View File

@ -90,14 +90,12 @@ void assert_async_binary_validation(V&& validator, C&& continuable,
"Async completion handler called with a different count "
"of arguments!");
traits::static_for_each_in(
std::make_index_sequence<size.value>{}, [&](auto current) mutable {
auto expected = std::get<current.value>(std::move(expected_pack));
auto actual = std::get<current.value>(std::move(actual_pack));
(void)current;
validator(expected, actual);
});
traits::unpack(std::move(expected_pack), [&](auto&&... expected) {
std::initializer_list<int>{
0, ((void)validator(std::forward<decltype(args)>(args),
std::forward<decltype(expected)>(expected)),
0)...};
});
});
}

View File

@ -24,11 +24,9 @@
#include "test-continuable.hpp"
TYPED_TEST(single_dimension_tests, are_chainable) {
auto chain = this->supply().then([] {
EXPECT_ASYNC_RESULT(this->supply().then([] {
return; // void
});
ASSERT_ASYNC_TYPES(std::move(chain));
}));
}
TYPED_TEST(single_dimension_tests, are_type_chainable) {