| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "test_ipcsharedmem.h" | ||
| 2 | #include "gate/io/ipcsharedmem.h" | ||
| 3 | #include "gate/strings.h" | ||
| 4 | |||
| 5 | 1 | GATE_TEST_FUNCTION(test_ipcsharedmem) | |
| 6 | { | ||
| 7 | gate_result_t result; | ||
| 8 | gate_ipcsharedmem_t sh_mem; | ||
| 9 | 1 | gate_string_t sh_mem_uid = GATE_STRING_INIT_EMPTY; | |
| 10 | 1 | void* ptr_sh_mem = NULL; | |
| 11 | |||
| 12 | 1 | GATE_TEST_UNIT_BEGIN(test_ipcsharedmem); | |
| 13 | |||
| 14 | 1 | result = gate_ipcsharedmem_create(&sh_mem, 32, 0, &sh_mem_uid); | |
| 15 |
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
|
1 | GATE_TEST_REQUIRE_OK(result); |
| 16 | 1 | gate_string_release(&sh_mem_uid); | |
| 17 | |||
| 18 | 1 | result = gate_ipcsharedmem_attach(sh_mem, &ptr_sh_mem); | |
| 19 |
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
|
1 | GATE_TEST_REQUIRE_OK(result); |
| 20 | |||
| 21 |
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
|
1 | GATE_TEST_CHECK_NOT_EQUAL(ptr_sh_mem, NULL); |
| 22 | |||
| 23 | 1 | result = gate_ipcsharedmem_detach(sh_mem, ptr_sh_mem); | |
| 24 |
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
|
1 | GATE_TEST_CHECK_OK(result); |
| 25 | |||
| 26 | 1 | result = gate_ipcsharedmem_destroy(sh_mem); | |
| 27 |
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
|
1 | GATE_TEST_CHECK_OK(result); |
| 28 | |||
| 29 | 1 | GATE_TEST_UNIT_END; | |
| 30 | } | ||
| 31 |