X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Ffutures%2Ftest%2FThenTest.cpp;fp=folly%2Ffutures%2Ftest%2FThenTest.cpp;h=3264dded9a0d44f56802a391e67316699ba789f4;hb=372fad515345d453e340a01b54b2ded98a6f2f40;hp=6d330f64b6635a1bea4f94aa371e350be07cbae1;hpb=86e0057c168a70f5cbe8a1d5397ee7bd0beb16d8;p=folly.git diff --git a/folly/futures/test/ThenTest.cpp b/folly/futures/test/ThenTest.cpp index 6d330f64..3264dded 100644 --- a/folly/futures/test/ThenTest.cpp +++ b/folly/futures/test/ThenTest.cpp @@ -168,3 +168,9 @@ TEST(Then, constValue) { }); EXPECT_EQ(future.value(), 23); } + +TEST(Future, voidThenShouldPropagateExceptions) { + EXPECT_FALSE(makeFuture(42).then().hasException()); + EXPECT_TRUE(makeFuture(std::runtime_error("err")) + .then().hasException()); +}