tests fixed

This commit is contained in:
Michele Caini 2016-10-14 17:49:40 +02:00
parent 1e158e80c8
commit 98d563ad9e
2 changed files with 9 additions and 0 deletions

View File

@ -11,6 +11,10 @@ TEST(Handle, Functionalities) {
ASSERT_NO_THROW(handle->close());
ASSERT_FALSE(handle->active());
// this forces an internal call to the close callback
// (possible leak detected by valgrind otherwise)
loop->run();
ASSERT_NO_THROW(handle->reference());
ASSERT_TRUE(handle->referenced());
ASSERT_NO_THROW(handle->unreference());

View File

@ -108,6 +108,11 @@ TEST(Timer, Repeat) {
ASSERT_NO_THROW(handle->repeat(uvw::TimerHandle::Time{42}));
ASSERT_EQ(handle->repeat(), uvw::TimerHandle::Time{42});
ASSERT_NO_THROW(handle->close());
// this forces an internal call to the close callback
// (possible leak detected by valgrind otherwise)
loop->run();
}