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 "
|
"Async completion handler called with a different count "
|
||||||
"of arguments!");
|
"of arguments!");
|
||||||
|
|
||||||
traits::static_for_each_in(
|
traits::unpack(std::move(expected_pack), [&](auto&&... expected) {
|
||||||
std::make_index_sequence<size.value>{}, [&](auto current) mutable {
|
std::initializer_list<int>{
|
||||||
auto expected = std::get<current.value>(std::move(expected_pack));
|
0, ((void)validator(std::forward<decltype(args)>(args),
|
||||||
auto actual = std::get<current.value>(std::move(actual_pack));
|
std::forward<decltype(expected)>(expected)),
|
||||||
(void)current;
|
0)...};
|
||||||
|
});
|
||||||
validator(expected, actual);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,11 +24,9 @@
|
|||||||
#include "test-continuable.hpp"
|
#include "test-continuable.hpp"
|
||||||
|
|
||||||
TYPED_TEST(single_dimension_tests, are_chainable) {
|
TYPED_TEST(single_dimension_tests, are_chainable) {
|
||||||
auto chain = this->supply().then([] {
|
EXPECT_ASYNC_RESULT(this->supply().then([] {
|
||||||
return; // void
|
return; // void
|
||||||
});
|
}));
|
||||||
|
|
||||||
ASSERT_ASYNC_TYPES(std::move(chain));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TYPED_TEST(single_dimension_tests, are_type_chainable) {
|
TYPED_TEST(single_dimension_tests, are_type_chainable) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user