diff options
author | Brad King <brad.king@kitware.com> | 2023-11-20 20:52:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-11-20 23:22:53 (GMT) |
commit | fb7ee82271cabed2197e1ed0c5be70453184e4e2 (patch) | |
tree | f736ec77cbec9bf318132defbe29cdc045725441 /Tests | |
parent | 9dd14b2946eb821c1b8e5a5a8f81653710826a01 (diff) | |
download | CMake-fb7ee82271cabed2197e1ed0c5be70453184e4e2.zip CMake-fb7ee82271cabed2197e1ed0c5be70453184e4e2.tar.gz CMake-fb7ee82271cabed2197e1ed0c5be70453184e4e2.tar.bz2 |
cmUVHandlePtr: Add uv_idle_ptr::{start,stop} methods
These were missing w.r.t. the pattern established for other handle wrappers.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLib/testUVHandlePtr.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Tests/CMakeLib/testUVHandlePtr.cxx b/Tests/CMakeLib/testUVHandlePtr.cxx index d6fdb77..3c070b0 100644 --- a/Tests/CMakeLib/testUVHandlePtr.cxx +++ b/Tests/CMakeLib/testUVHandlePtr.cxx @@ -19,7 +19,7 @@ static bool testIdle() cm::uv_idle_ptr idle; idle.init(*loop, &idled); - uv_idle_start(idle, cb); + idle.start(cb); uv_run(loop, UV_RUN_DEFAULT); if (!idled) { @@ -27,6 +27,17 @@ static bool testIdle() return false; } + idled = false; + + idle.start(cb); + idle.stop(); + uv_run(loop, UV_RUN_DEFAULT); + + if (idled) { + std::cerr << "uv_idle_ptr::stop did not stop callback" << std::endl; + return false; + } + return true; } |