tests + fixed uvw::Loop::configure
This commit is contained in:
parent
34adf15a24
commit
40ca3fd469
@ -208,7 +208,8 @@ public:
|
||||
*/
|
||||
template<typename... Args>
|
||||
void configure(Configure flag, Args&&... args) {
|
||||
auto err = uv_loop_configure(loop.get(), static_cast<std::underlying_type_t<Configure>>(flag), std::forward<Args>(args)...);
|
||||
auto option = static_cast<std::underlying_type_t<Configure>>(flag);
|
||||
auto err = uv_loop_configure(loop.get(), static_cast<uv_loop_option>(option), std::forward<Args>(args)...);
|
||||
if(err) { publish(ErrorEvent{err}); }
|
||||
}
|
||||
|
||||
|
||||
@ -53,3 +53,10 @@ TEST(Loop, Functionalities) {
|
||||
|
||||
ASSERT_FALSE(loop->alive());
|
||||
}
|
||||
|
||||
|
||||
TEST(Loop, Configure) {
|
||||
auto loop = uvw::Loop::create();
|
||||
ASSERT_NO_THROW(loop->configure(uvw::Loop::Configure::BLOCK_SIGNAL, 9));
|
||||
ASSERT_NO_THROW(loop->run());
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user