GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 70.0% 7 / 0 / 10
Functions: 50.0% 1 / 0 / 2
Branches: 66.7% 4 / 0 / 6
Decisions: 75.0% 3 / - / 4

firmware/controllers/system/efi_output.cpp
Line Branch Decision Exec Source
1 /*
2 * @file efi_output.cpp
3 *
4 */
5
6 #include "pch.h"
7 #include "efi_output.h"
8
9 3396 bool SwitchedState::update(bool const newState) {
10
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 3396 times.
1/2
✗ Decision 'true' not taken.
✓ Decision 'false' taken 3396 times.
3396 if (state == nullptr) {
11 return false;
12 }
13
14
2/2
✓ Branch 0 taken 5 times.
✓ Branch 1 taken 3391 times.
2/2
✓ Decision 'true' taken 5 times.
✓ Decision 'false' taken 3391 times.
3396 if (newState != *state) {
15
1/2
✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
5 *state = newState ? 1 : 0;
16 5 counter++;
17 5 return true;
18 }
19
20 3391 return false;
21 }
22
23 uint16_t SwitchedState::getCounter() const {
24 return counter;
25 }
26