unit_test::thread fixes:

* Fail on exception in unit_test::thread
* Add unit_test:🧵:detach()
This commit is contained in:
Vinnie Falco
2016-03-19 08:57:01 -04:00
parent db8fb177b8
commit f60eeaf08c

View File

@@ -94,6 +94,12 @@ public:
s_->propagate_abort(); s_->propagate_abort();
} }
void
detach()
{
t_.detach();
}
void void
swap (thread& other) swap (thread& other)
{ {
@@ -112,6 +118,15 @@ private:
catch (suite::abort_exception const&) catch (suite::abort_exception const&)
{ {
} }
catch (std::exception const& e)
{
s_->fail ("unhandled exception: " +
std::string (e.what()));
}
catch (...)
{
s_->fail ("unhandled exception");
}
} }
}; };