From 7484c671af89d8eac9fc37ae31b78949ac5375fa Mon Sep 17 00:00:00 2001 From: Denis Blank Date: Tue, 11 Aug 2015 22:17:59 +0200 Subject: [PATCH] improve a test --- Test.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Test.cpp b/Test.cpp index 4f1ec59..dbcc749 100644 --- a/Test.cpp +++ b/Test.cpp @@ -202,9 +202,22 @@ TEST_CASE("Continuable continuation chaining using Continuable::then", "[Continu { REQUIRE(invoked == 2); invoked = 3; + + return make_continuable([&](Callback&& callback) + { + REQUIRE(invoked == 3); + invoked = 4; + + callback(5); + }); + }) + .then([&](std::size_t t) + { + REQUIRE(invoked == 4); + invoked = t; }); - REQUIRE(invoked == 3); + REQUIRE(invoked == 5); } SECTION("Continuation chains need a callback to continue")