GCC Code Coverage Report


Directory: src/gate/
File: src/gate/encode/tests/gateencode_test/test_texticons.c
Date: 2026-02-03 22:06:38
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
12
1/2
✓ Branch 2 taken 129 times.
✗ Branch 3 not taken.
129 GATE_TEST_CHECK(icon_char != 0);
13
1/2
✓ Branch 2 taken 129 times.
✗ Branch 3 not taken.
129 GATE_TEST_CHECK(description != NULL);
14
15
1/2
✓ Branch 3 taken 129 times.
✗ Branch 4 not taken.
129 GATE_TEST_CHECK_OK(gate_texticon_description(icon_char, &descr));
16
1/2
✓ Branch 2 taken 129 times.
✗ Branch 3 not taken.
129 GATE_TEST_CHECK_EQUAL(description, descr);
17
18 129 return true;
19 }
20
21 1 GATE_TEST_FUNCTION(test_texticons)
22 {
23 1 GATE_TEST_UNIT_BEGIN(texticons);
24
25
1/2
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
1 GATE_TEST_CHECK_OK(gate_texticon_enum(&cb_texticons, NULL));
26
27 1 GATE_TEST_UNIT_END;
28 }
29