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

Function test_mp_static_init

src/utest/mempool_tc.c:23–32  ·  view source on GitHub ↗

Static memory pool test */

Source from the content-addressed store, hash-verified

21
22/* Static memory pool test */
23static void test_mp_static_init(void)
24{
25 rt_err_t err;
26
27 err = rt_mp_init(&mp_static, "mp_static", &mempool_static[0], sizeof(mempool_static), MEMPOOL_BLOCK_SIZE);
28 uassert_true(err == RT_EOK);
29 uassert_str_equal(mp_static.parent.name, "mp_static");
30 uassert_true(mp_static.block_total_count == MEMPOOL_BLOCK_COUNT);
31 uassert_true(mp_static.block_free_count == MEMPOOL_BLOCK_COUNT);
32}
33
34/* Dynamic memory pool test */
35static void test_mp_dynamic_create(void)

Callers

nothing calls this directly

Calls 1

rt_mp_initFunction · 0.85

Tested by

no test coverage detected