MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / test_event_init

Function test_event_init

src/utest/event_tc.c:48–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46#define THREAD_TIMESLICE 5
47
48static void test_event_init(void)
49{
50 rt_err_t result;
51
52 result = rt_event_init(&static_event, "event", RT_IPC_FLAG_PRIO);
53 if (result != RT_EOK)
54 {
55 uassert_false(1);
56 }
57 result = rt_event_detach(&static_event);
58 if (result != RT_EOK)
59 {
60 uassert_false(1);
61 }
62
63 result = rt_event_init(&static_event, "event", RT_IPC_FLAG_FIFO);
64 if (result != RT_EOK)
65 {
66 uassert_false(1);
67 }
68 result = rt_event_detach(&static_event);
69 if (result != RT_EOK)
70 {
71 uassert_false(1);
72 }
73
74 uassert_true(1);
75}
76
77static void test_event_detach(void)
78{

Callers

nothing calls this directly

Calls 2

rt_event_initFunction · 0.85
rt_event_detachFunction · 0.85

Tested by

no test coverage detected