mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
add some simple event tests
This commit is contained in:
parent
f5908cfe69
commit
7ec99c3394
@ -4,4 +4,16 @@
|
||||
#include <libipc/event.h>
|
||||
|
||||
TEST(event, open_close) {
|
||||
auto evt = ipc::evt_open("test");
|
||||
ASSERT_TRUE(evt);
|
||||
ASSERT_EQ(ipc::evt_name(*evt), "test");
|
||||
ASSERT_TRUE(ipc::evt_close(*evt));
|
||||
}
|
||||
|
||||
TEST(event, set_wait) {
|
||||
auto evt = ipc::evt_open("test");
|
||||
ASSERT_TRUE(evt);
|
||||
ASSERT_TRUE(ipc::evt_set(*evt));
|
||||
ASSERT_TRUE(ipc::evt_wait(*evt, 0));
|
||||
ASSERT_TRUE(ipc::evt_close(*evt));
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user