GCC Code Coverage Report


Directory: src/gate/
File: src/gate/encode/tests/gateencode_test/test_texticons.c
Date: 2025-12-12 23:40:09
Exec Total Coverage
Lines: 11 11 100.0%
Functions: 2 2 100.0%
Branches: 5 10 50.0%

Line Branch Exec Source
1 #include "test_texticons.h"
2
3 #include "gate/encode/texticons.h"
4
5
6 typedef gate_bool_t(*gate_texticon_enum_callback_t)(gate_uint32_t icon_char, void* user_param, char const* description);
7
8 129 static gate_bool_t cb_texticons(gate_uint32_t icon_char, void* user_param, char const* description)
9 {
10 129 char const* descr = NULL;
11 gate_result_t result;
12
13
1/2
✓ Branch 2 taken 129 times.
✗ Branch 3 not taken.
129 GATE_TEST_CHECK(icon_char != 0);
14
1/2
✓ Branch 2 taken 129 times.
✗ Branch 3 not taken.
129 GATE_TEST_CHECK(description != NULL);
15
16
1/2
✓ Branch 3 taken 129 times.
✗ Branch 4 not taken.
129 GATE_TEST_CHECK_OK(gate_texticon_description(icon_char, &descr));
17
1/2
✓ Branch 2 taken 129 times.
✗ Branch 3 not taken.
129 GATE_TEST_CHECK_EQUAL(description, descr);
18
19 129 return true;
20 }
21
22 1 GATE_TEST_FUNCTION(test_texticons)
23 {
24 1 GATE_TEST_UNIT_BEGIN(texticons);
25
26
1/2
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
1 GATE_TEST_CHECK_OK(gate_texticon_enum(&cb_texticons, NULL));
27
28 1 GATE_TEST_UNIT_END;
29 }
30