projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
then() ropagates exceptions properly
[folly.git]
/
folly
/
futures
/
test
/
ThenTest.cpp
diff --git
a/folly/futures/test/ThenTest.cpp
b/folly/futures/test/ThenTest.cpp
index 6d330f64b6635a1bea4f94aa371e350be07cbae1..3264dded9a0d44f56802a391e67316699ba789f4 100644
(file)
--- 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<int>(std::runtime_error("err"))
+ .then().hasException());
+}