From 12c23f15f8f040f548b5c4551afc4301bc00304a Mon Sep 17 00:00:00 2001 From: Denis Blank Date: Tue, 6 Mar 2018 21:36:27 +0100 Subject: [PATCH] Fix a defect unit test --- include/continuable/continuable-compositions.hpp | 3 --- include/continuable/continuable-promisify.hpp | 2 +- test/unit-test/multi/test-continuable-regression.cpp | 6 ++---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/include/continuable/continuable-compositions.hpp b/include/continuable/continuable-compositions.hpp index d8a290d..0fc2a70 100644 --- a/include/continuable/continuable-compositions.hpp +++ b/include/continuable/continuable-compositions.hpp @@ -37,10 +37,7 @@ #include #include #include -#include #include -#include -#include namespace cti { /// Connects the given arguments with an all logic. diff --git a/include/continuable/continuable-promisify.hpp b/include/continuable/continuable-promisify.hpp index 9840df0..a230f64 100644 --- a/include/continuable/continuable-promisify.hpp +++ b/include/continuable/continuable-promisify.hpp @@ -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 diff --git a/test/unit-test/multi/test-continuable-regression.cpp b/test/unit-test/multi/test-continuable-regression.cpp index f91e9ff..32c5e71 100644 --- a/test/unit-test/multi/test-continuable-regression.cpp +++ b/test/unit-test/multi/test-continuable-regression.cpp @@ -23,8 +23,8 @@ #include -#include #include +#include #include using namespace cti; @@ -42,9 +42,7 @@ TEST(regression_tests, are_multiple_args_mergeable) { auto count = traits::unpack(tp2, [](auto... args) { std::vector 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); }