tests: add thread-in-thread test case

This commit is contained in:
Pekka Enberg
2015-06-16 17:10:38 +03:00
committed by Avi Kivity
parent c477f0e208
commit 194cb68c8b

View File

@@ -87,3 +87,14 @@ SEASTAR_TEST_CASE(test_thread_async_immed) {
BOOST_REQUIRE_EQUAL(three, 3);
});
}
SEASTAR_TEST_CASE(test_thread_async_nested) {
return async([] {
return async([] {
return 3;
}).get0();
}).then([] (int three) {
BOOST_REQUIRE_EQUAL(three, 3);
});
}