mirror of
https://github.com/Naios/continuable.git
synced 2026-01-01 03:12:12 +08:00
Fix a defect unit test
This commit is contained in:
parent
1aae8c3083
commit
12c23f15f8
@ -37,10 +37,7 @@
|
||||
#include <continuable/detail/composition-any.hpp>
|
||||
#include <continuable/detail/composition-seq.hpp>
|
||||
#include <continuable/detail/composition.hpp>
|
||||
#include <continuable/detail/features.hpp>
|
||||
#include <continuable/detail/range.hpp>
|
||||
#include <continuable/detail/traits.hpp>
|
||||
#include <continuable/detail/util.hpp>
|
||||
|
||||
namespace cti {
|
||||
/// Connects the given arguments with an all logic.
|
||||
|
||||
@ -71,7 +71,7 @@ public:
|
||||
/// two behaviours depending whether exceptions are enabled:
|
||||
/// - If exceptions are enabled the error type is passed via
|
||||
/// an exception_ptr to the failure handler.
|
||||
/// - If exceptions are disabled the error type is copnverted to an
|
||||
/// - If exceptions are disabled the error type is converted to a
|
||||
/// `std::error_conditon` and passed down to the error handler.
|
||||
///
|
||||
/// \since 3.0.0
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
|
||||
#include <test-continuable.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <numeric>
|
||||
#include <vector>
|
||||
|
||||
using namespace cti;
|
||||
@ -42,9 +42,7 @@ TEST(regression_tests, are_multiple_args_mergeable) {
|
||||
|
||||
auto count = traits::unpack(tp2, [](auto... args) {
|
||||
std::vector<int> v{args...};
|
||||
int c = 0;
|
||||
std::count(v.begin(), v.end(), c);
|
||||
return c;
|
||||
return std::accumulate(v.begin(), v.end(), 0);
|
||||
});
|
||||
EXPECT_EQ(count, 20);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user