mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
Simplify assert_async_binary_validation
This commit is contained in:
parent
342d08ab1d
commit
b488d88370
@ -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)...};
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user