GCC Code Coverage Report


Directory: ./
Date: 2025-12-16 19:41:02
Exec Total Coverage
Lines: 591 1175 50.3%
Functions: 71 169 42.0%
Branches: 278 806 34.5%

Function (File:Line) Call count Block coverage
EntryGateController::EntryGateController(IEventBus&, IGpioInput&, IGate&, ITicketService&, unsigned int) (components/parking_system/src/gates/EntryGateController.cpp:7)called 6 times, returned 6 times54.0%
EntryGateController::EntryGateController(IEventBus&, IGpioInput&, IGate&, ITicketService&, unsigned int)::{lambda(Event const&)#1}::operator()(Event const&) const (components/parking_system/src/gates/EntryGateController.cpp:23)called 6 times, returned 6 times100.0%
EntryGateController::EntryGateController(IEventBus&, IGpioInput&, IGate&, ITicketService&, unsigned int)::{lambda(Event const&)#2}::operator()(Event const&) const (components/parking_system/src/gates/EntryGateController.cpp:25)called 1 time, returned 1 time100.0%
EntryGateController::EntryGateController(IEventBus&, IGpioInput&, IGate&, ITicketService&, unsigned int)::{lambda(Event const&)#3}::operator()(Event const&) const (components/parking_system/src/gates/EntryGateController.cpp:27)called 1 time, returned 1 time100.0%
EntryGateController::TEST_forceBarrierTimeout() (components/parking_system/include/gates/EntryGateController.h:94)called 5 times, returned 5 times100.0%
EntryGateController::barrierTimerCallback(TimerStub*) (components/parking_system/src/gates/EntryGateController.cpp:207)not called0.0%
EntryGateController::getState() const (components/parking_system/include/gates/EntryGateController.h:63)called 17 times, returned 17 times100.0%
EntryGateController::getStateString() const (components/parking_system/src/gates/EntryGateController.cpp:59)called 26 times, returned 26 times91.0%
EntryGateController::onBarrierTimeout() (components/parking_system/src/gates/EntryGateController.cpp:170)called 5 times, returned 5 times90.0%
EntryGateController::onButtonPressed(Event const&) (components/parking_system/src/gates/EntryGateController.cpp:105)called 6 times, returned 6 times74.0%
EntryGateController::onLightBarrierBlocked(Event const&) (components/parking_system/src/gates/EntryGateController.cpp:146)called 1 time, returned 1 time100.0%
EntryGateController::onLightBarrierCleared(Event const&) (components/parking_system/src/gates/EntryGateController.cpp:154)called 1 time, returned 1 time92.0%
EntryGateController::reset() (components/parking_system/src/gates/EntryGateController.cpp:82)not called0.0%
EntryGateController::setState(EntryGateState) (components/parking_system/src/gates/EntryGateController.cpp:98)called 21 times, returned 21 times100.0%
EntryGateController::setupGpioInterrupts() (components/parking_system/src/gates/EntryGateController.cpp:46)not called0.0%
EntryGateController::setupGpioInterrupts()::{lambda(bool)#1}::operator()(bool) const (components/parking_system/src/gates/EntryGateController.cpp:48)not called0.0%
EntryGateController::startBarrierTimer() (components/parking_system/src/gates/EntryGateController.cpp:195)called 4 times, returned 4 times100.0%
EntryGateController::stopBarrierTimer() (components/parking_system/src/gates/EntryGateController.cpp:201)not called0.0%
EntryGateController::~EntryGateController() (components/parking_system/src/gates/EntryGateController.cpp:40)called 6 times, returned 6 times100.0%
EspGpioInput::EspGpioInput(gpio_num_t, unsigned int) (components/parking_system/src/hal/EspGpioInput.cpp:9)not called0.0%
EspGpioInput::disableInterrupt() (components/parking_system/src/hal/EspGpioInput.cpp:74)not called0.0%
EspGpioInput::enableInterrupt() (components/parking_system/src/hal/EspGpioInput.cpp:44)not called0.0%
EspGpioInput::getLevel() const (components/parking_system/src/hal/EspGpioInput.cpp:36)not called0.0%
EspGpioInput::gpioIsrHandler(void*) (components/parking_system/src/hal/EspGpioInput.cpp:86)not called0.0%
EspGpioInput::handleInterrupt() (components/parking_system/src/hal/EspGpioInput.cpp:96)not called0.0%
EspGpioInput::setInterruptHandler(std::function<void (bool)>) (components/parking_system/src/hal/EspGpioInput.cpp:40)not called0.0%
EspGpioInput::simulateInterrupt(bool) (components/parking_system/src/hal/EspGpioInput.cpp:79)not called0.0%
EspGpioInput::~EspGpioInput() (components/parking_system/src/hal/EspGpioInput.cpp:32)not called0.0%
EspGpioOutput::EspGpioOutput(gpio_num_t, bool) (components/parking_system/src/hal/EspGpioOutput.cpp:6)not called0.0%
EspGpioOutput::getLevel() const (components/parking_system/src/hal/EspGpioOutput.cpp:32)not called0.0%
EspGpioOutput::setLevel(bool) (components/parking_system/src/hal/EspGpioOutput.cpp:27)not called0.0%
EspGpioOutput::~EspGpioOutput() (components/parking_system/include/hal/EspGpioOutput.h:19)not called0.0%
EspServoOutput::EspServoOutput(gpio_num_t, ledc_channel_t, bool) (components/parking_system/src/hal/EspServoOutput.cpp:7)not called0.0%
EspServoOutput::getLevel() const (components/parking_system/src/hal/EspServoOutput.cpp:73)not called0.0%
EspServoOutput::setAngle(unsigned int) (components/parking_system/src/hal/EspServoOutput.cpp:77)not called0.0%
EspServoOutput::setLevel(bool) (components/parking_system/src/hal/EspServoOutput.cpp:63)not called0.0%
EspServoOutput::~EspServoOutput() (components/parking_system/src/hal/EspServoOutput.cpp:58)not called0.0%
Event::Event() (components/parking_system/include/events/Event.h:50)not called0.0%
Event::Event(EventType, unsigned long, std::variant<std::monostate, unsigned int, bool>) (components/parking_system/include/events/Event.h:55)called 30 times, returned 30 times100.0%
ExitGateController::ExitGateController(IEventBus&, IGate&, ITicketService&, unsigned int, unsigned int) (components/parking_system/src/gates/ExitGateController.cpp:7)called 6 times, returned 6 times61.0%
ExitGateController::ExitGateController(IEventBus&, IGate&, ITicketService&, unsigned int, unsigned int)::{lambda(Event const&)#1}::operator()(Event const&) const (components/parking_system/src/gates/ExitGateController.cpp:24)called 2 times, returned 2 times100.0%
ExitGateController::ExitGateController(IEventBus&, IGate&, ITicketService&, unsigned int, unsigned int)::{lambda(Event const&)#2}::operator()(Event const&) const (components/parking_system/src/gates/ExitGateController.cpp:26)called 1 time, returned 1 time100.0%
ExitGateController::TEST_forceBarrierTimeout() (components/parking_system/include/gates/ExitGateController.h:94)called 3 times, returned 3 times100.0%
ExitGateController::barrierTimerCallback(TimerStub*) (components/parking_system/src/gates/ExitGateController.cpp:224)not called0.0%
ExitGateController::getState() const (components/parking_system/include/gates/ExitGateController.h:61)called 14 times, returned 14 times100.0%
ExitGateController::getStateString() const (components/parking_system/src/gates/ExitGateController.cpp:78)called 16 times, returned 16 times90.0%
ExitGateController::onBarrierTimeout() (components/parking_system/src/gates/ExitGateController.cpp:177)called 3 times, returned 3 times90.0%
ExitGateController::onLightBarrierBlocked(Event const&) (components/parking_system/src/gates/ExitGateController.cpp:106)called 2 times, returned 2 times100.0%
ExitGateController::onLightBarrierCleared(Event const&) (components/parking_system/src/gates/ExitGateController.cpp:116)called 1 time, returned 1 time92.0%
ExitGateController::onValidationTimeout() (components/parking_system/src/gates/ExitGateController.cpp:132)not called0.0%
ExitGateController::reset() (components/parking_system/src/gates/ExitGateController.cpp:59)not called0.0%
ExitGateController::setState(ExitGateState) (components/parking_system/src/gates/ExitGateController.cpp:99)called 13 times, returned 13 times100.0%
ExitGateController::setupGpioInterrupts() (components/parking_system/src/gates/ExitGateController.cpp:55)not called0.0%
ExitGateController::startBarrierTimer() (components/parking_system/src/gates/ExitGateController.cpp:200)called 2 times, returned 2 times100.0%
ExitGateController::startValidationTimer() (components/parking_system/src/gates/ExitGateController.cpp:212)not called0.0%
ExitGateController::stopBarrierTimer() (components/parking_system/src/gates/ExitGateController.cpp:206)not called0.0%
ExitGateController::stopValidationTimer() (components/parking_system/src/gates/ExitGateController.cpp:218)not called0.0%
ExitGateController::validateTicketManually(unsigned int) (components/parking_system/src/gates/ExitGateController.cpp:138)called 4 times, returned 4 times71.0%
ExitGateController::validationTimerCallback(TimerStub*) (components/parking_system/src/gates/ExitGateController.cpp:231)not called0.0%
ExitGateController::~ExitGateController() (components/parking_system/src/gates/ExitGateController.cpp:46)called 6 times, returned 6 times100.0%
FreeRtosEventBus::FreeRtosEventBus(unsigned long) (components/parking_system/src/events/FreeRtosEventBus.cpp:7)not called0.0%
FreeRtosEventBus::dispatchEvent(Event const&) (components/parking_system/src/events/FreeRtosEventBus.cpp:99)not called0.0%
FreeRtosEventBus::eventLoopTask(void*) (components/parking_system/src/events/FreeRtosEventBus.cpp:167)not called0.0%
FreeRtosEventBus::isEventLoopRunning() const (components/parking_system/src/events/FreeRtosEventBus.cpp:163)not called0.0%
FreeRtosEventBus::processAllPending() (components/parking_system/src/events/FreeRtosEventBus.cpp:78)not called0.0%
FreeRtosEventBus::publish(Event const&) (components/parking_system/src/events/FreeRtosEventBus.cpp:41)not called0.0%
FreeRtosEventBus::publishFromISR(Event const&) (components/parking_system/src/events/FreeRtosEventBus.cpp:58)not called0.0%
FreeRtosEventBus::startEventLoop(unsigned int, unsigned int, char const*) (components/parking_system/src/events/FreeRtosEventBus.cpp:116)not called0.0%
FreeRtosEventBus::stopEventLoop() (components/parking_system/src/events/FreeRtosEventBus.cpp:142)not called0.0%
FreeRtosEventBus::subscribe(EventType, std::function<void (Event const&)>) (components/parking_system/src/events/FreeRtosEventBus.cpp:33)not called0.0%
FreeRtosEventBus::waitForEvent(Event&, unsigned int) (components/parking_system/src/events/FreeRtosEventBus.cpp:85)not called0.0%
FreeRtosEventBus::~FreeRtosEventBus() (components/parking_system/src/events/FreeRtosEventBus.cpp:21)not called0.0%
Gate::Gate(gpio_num_t, gpio_num_t, ledc_channel_t) (components/parking_system/src/gates/Gate.cpp:6)not called0.0%
Gate::Gate(gpio_num_t, unsigned int, gpio_num_t, gpio_num_t, ledc_channel_t) (components/parking_system/src/gates/Gate.cpp:17)not called0.0%
Gate::close() (components/parking_system/src/gates/Gate.cpp:37)not called0.0%
Gate::isCarDetected() const (components/parking_system/src/gates/Gate.cpp:49)not called0.0%
Gate::isOpen() const (components/parking_system/src/gates/Gate.cpp:45)not called0.0%
Gate::open() (components/parking_system/src/gates/Gate.cpp:29)not called0.0%
IEventBus::~IEventBus() (components/parking_system/include/events/IEventBus.h:14)called 10 times, returned 10 times100.0%
IGate::~IGate() (components/parking_system/include/gates/IGate.h:11)called 12 times, returned 12 times100.0%
IGpioInput::~IGpioInput() (components/parking_system/include/hal/IGpioInput.h:13)called 6 times, returned 6 times100.0%
IGpioOutput::~IGpioOutput() (components/parking_system/include/hal/IGpioOutput.h:11)not called0.0%
ITicketService::~ITicketService() (components/parking_system/include/tickets/ITicketService.h:15)called 10 times, returned 10 times100.0%
MockEventBus::MockEventBus() (test/unit-tests/mocks/MockEventBus.h:15)called 10 times, returned 10 times86.0%
MockEventBus::dispatchEvent(Event const&) (test/unit-tests/mocks/MockEventBus.h:63)called 28 times, returned 28 times94.0%
MockEventBus::history() const (test/unit-tests/mocks/MockEventBus.h:59)called 1 time, returned 1 time100.0%
MockEventBus::processAllPending() (test/unit-tests/mocks/MockEventBus.h:26)called 15 times, returned 15 times100.0%
MockEventBus::publish(Event const&) (test/unit-tests/mocks/MockEventBus.h:21)called 30 times, returned 30 times100.0%
MockEventBus::subscribe(EventType, std::function<void (Event const&)>) (test/unit-tests/mocks/MockEventBus.h:17)called 30 times, returned 30 times100.0%
MockEventBus::waitForEvent(Event&, unsigned int) (test/unit-tests/mocks/MockEventBus.h:34)not called0.0%
MockGate::MockGate() (test/unit-tests/mocks/MockGate.h:10)called 12 times, returned 12 times100.0%
MockGate::close() (test/unit-tests/mocks/MockGate.h:18)called 2 times, returned 2 times100.0%
MockGate::isCarDetected() const (test/unit-tests/mocks/MockGate.h:26)not called0.0%
MockGate::isOpen() const (test/unit-tests/mocks/MockGate.h:22)called 16 times, returned 16 times100.0%
MockGate::open() (test/unit-tests/mocks/MockGate.h:14)called 6 times, returned 6 times100.0%
MockGpioInput::MockGpioInput() (test/unit-tests/mocks/MockGpioInput.h:12)called 6 times, returned 6 times100.0%
MockGpioInput::disableInterrupt() (test/unit-tests/mocks/MockGpioInput.h:29)not called0.0%
MockGpioInput::enableInterrupt() (test/unit-tests/mocks/MockGpioInput.h:25)not called0.0%
MockGpioInput::getLevel() const (test/unit-tests/mocks/MockGpioInput.h:17)not called0.0%
MockGpioInput::setInterruptHandler(std::function<void (bool)>) (test/unit-tests/mocks/MockGpioInput.h:21)not called0.0%
MockTicketService::MockTicketService(unsigned int) (test/unit-tests/mocks/MockTicketService.h:13)called 10 times, returned 10 times100.0%
MockTicketService::getActiveTicketCount() const (test/unit-tests/mocks/MockTicketService.h:58)called 17 times, returned 17 times100.0%
MockTicketService::getCapacity() const (test/unit-tests/mocks/MockTicketService.h:68)called 5 times, returned 5 times100.0%
MockTicketService::getNewTicket() (test/unit-tests/mocks/MockTicketService.h:17)called 10 times, returned 10 times80.0%
MockTicketService::getTicketInfo(unsigned int, Ticket&) const (test/unit-tests/mocks/MockTicketService.h:49)called 5 times, returned 5 times100.0%
MockTicketService::payTicket(unsigned int) (test/unit-tests/mocks/MockTicketService.h:28)called 3 times, returned 3 times91.0%
MockTicketService::reset() (test/unit-tests/mocks/MockTicketService.h:72)not called0.0%
MockTicketService::setCapacity(unsigned int) (test/unit-tests/mocks/MockTicketService.h:77)not called0.0%
MockTicketService::validateAndUseTicket(unsigned int) (test/unit-tests/mocks/MockTicketService.h:39)called 2 times, returned 2 times88.0%
Ticket::Ticket() (components/parking_system/include/tickets/Ticket.h:15)called 15 times, returned 15 times100.0%
Ticket::Ticket(unsigned int, unsigned long) (components/parking_system/include/tickets/Ticket.h:22)called 10 times, returned 10 times100.0%
TicketService::TicketService(unsigned int) (components/parking_system/src/tickets/TicketService.cpp:7)not called0.0%
TicketService::getActiveTicketCount() const (components/parking_system/src/tickets/TicketService.cpp:128)not called0.0%
TicketService::getCapacity() const (components/parking_system/src/tickets/TicketService.cpp:143)not called0.0%
TicketService::getNewTicket() (components/parking_system/src/tickets/TicketService.cpp:24)not called0.0%
TicketService::getTicketInfo(unsigned int, Ticket&) const (components/parking_system/src/tickets/TicketService.cpp:114)not called0.0%
TicketService::payTicket(unsigned int) (components/parking_system/src/tickets/TicketService.cpp:54)not called0.0%
TicketService::reset() (components/parking_system/src/tickets/TicketService.cpp:147)not called0.0%
TicketService::setCapacity(unsigned int) (components/parking_system/src/tickets/TicketService.cpp:156)not called0.0%
TicketService::validateAndUseTicket(unsigned int) (components/parking_system/src/tickets/TicketService.cpp:81)not called0.0%
TicketService::~TicketService() (components/parking_system/src/tickets/TicketService.cpp:18)not called0.0%
entryGateStateToString(EntryGateState) (components/parking_system/src/gates/EntryGateController.cpp:215)called 21 times, returned 21 times91.0%
esp_err_to_name(int) (test/unit-tests/stubs/esp_err.h:13)not called0.0%
esp_timer_get_time() (test/unit-tests/stubs/esp_timer.h:6)not called0.0%
eventTypeToString(EventType) (components/parking_system/include/events/Event.h:64)not called0.0%
exitGateStateToString(ExitGateState) (components/parking_system/src/gates/ExitGateController.cpp:239)called 13 times, returned 13 times90.0%
gpio_config(gpio_config_t const*) (test/unit-tests/stubs/driver/gpio.h:57)not called0.0%
gpio_get_level(gpio_num_t) (test/unit-tests/stubs/driver/gpio.h:61)not called0.0%
gpio_install_isr_service(int) (test/unit-tests/stubs/driver/gpio.h:69)not called0.0%
gpio_isr_handler_add(gpio_num_t, void (*)(void*), void*) (test/unit-tests/stubs/driver/gpio.h:73)not called0.0%
gpio_isr_handler_remove(gpio_num_t) (test/unit-tests/stubs/driver/gpio.h:77)not called0.0%
gpio_set_level(gpio_num_t, unsigned int) (test/unit-tests/stubs/driver/gpio.h:65)not called0.0%
ledc_channel_config(ledc_channel_config_t const*) (test/unit-tests/stubs/driver/ledc.h:80)not called0.0%
ledc_set_duty(ledc_mode_t, ledc_channel_t, unsigned int) (test/unit-tests/stubs/driver/ledc.h:84)not called0.0%
ledc_stop(ledc_mode_t, ledc_channel_t, unsigned int) (test/unit-tests/stubs/driver/ledc.h:92)not called0.0%
ledc_timer_config(ledc_timer_config_t const*) (test/unit-tests/stubs/driver/ledc.h:76)not called0.0%
ledc_update_duty(ledc_mode_t, ledc_channel_t) (test/unit-tests/stubs/driver/ledc.h:88)not called0.0%
main (test/unit-tests/test_entry_gate.cpp:185)called 1 time, returned 1 time100.0%
main (test/unit-tests/test_exit_gate.cpp:152)called 1 time, returned 1 time100.0%
main (test/unit-tests/test_integration.cpp:80)called 1 time, returned 1 time100.0%
pvTimerGetTimerID (test/unit-tests/stubs/freertos/timers.h:30)not called0.0%
test_entry_car_passing() (test/unit-tests/test_entry_gate.cpp:129)called 1 time, returned 1 time62.0%
test_entry_does_not_affect_exit() (test/unit-tests/test_integration.cpp:16)called 1 time, returned 1 time61.0%
test_entry_full_cycle() (test/unit-tests/test_entry_gate.cpp:28)called 1 time, returned 1 time64.0%
test_entry_ignore_repeated_press() (test/unit-tests/test_entry_gate.cpp:154)called 1 time, returned 1 time60.0%
test_entry_parking_full() (test/unit-tests/test_entry_gate.cpp:90)called 1 time, returned 1 time64.0%
test_exit_does_not_affect_entry() (test/unit-tests/test_integration.cpp:50)called 1 time, returned 1 time62.0%
test_exit_full_cycle() (test/unit-tests/test_exit_gate.cpp:13)called 1 time, returned 1 time65.0%
test_exit_light_barrier_in_idle_ignored() (test/unit-tests/test_exit_gate.cpp:124)called 1 time, returned 1 time63.0%
test_exit_no_tickets_rejected() (test/unit-tests/test_exit_gate.cpp:64)called 1 time, returned 1 time63.0%
test_exit_unpaid_ticket_rejected() (test/unit-tests/test_exit_gate.cpp:86)called 1 time, returned 1 time71.0%
vQueueDelete (test/unit-tests/stubs/freertos/queue.h:17)not called0.0%
vSemaphoreDelete (test/unit-tests/stubs/freertos/semphr.h:17)not called0.0%
vTaskDelay(unsigned int) (test/unit-tests/stubs/freertos/task.h:41)not called0.0%
vTaskDelete (test/unit-tests/stubs/freertos/task.h:34)not called0.0%
xQueueCreate (test/unit-tests/stubs/freertos/queue.h:13)not called0.0%
xQueueReceive (test/unit-tests/stubs/freertos/queue.h:25)not called0.0%
xQueueSend (test/unit-tests/stubs/freertos/queue.h:21)not called0.0%
xQueueSendFromISR (test/unit-tests/stubs/freertos/queue.h:29)not called0.0%
xSemaphoreCreateMutex (test/unit-tests/stubs/freertos/semphr.h:13)not called0.0%
xSemaphoreGive (test/unit-tests/stubs/freertos/semphr.h:25)not called0.0%
xSemaphoreTake (test/unit-tests/stubs/freertos/semphr.h:21)not called0.0%
xTaskCreate (test/unit-tests/stubs/freertos/task.h:19)not called0.0%
xTimerChangePeriod (test/unit-tests/stubs/freertos/timers.h:52)called 4 times, returned 4 times100.0%
xTimerCreate (test/unit-tests/stubs/freertos/timers.h:18)called 18 times, returned 18 times100.0%
xTimerDelete (test/unit-tests/stubs/freertos/timers.h:34)called 18 times, returned 18 times100.0%
xTimerIsTimerActive (test/unit-tests/stubs/freertos/timers.h:47)not called0.0%
xTimerReset (test/unit-tests/stubs/freertos/timers.h:39)called 10 times, returned 10 times100.0%
xTimerStop (test/unit-tests/stubs/freertos/timers.h:43)not called0.0%