Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit d1f0fed

Browse files
Khalil Estellkammce
authored andcommitted
📈 Include src files in coverage %
1 parent 57d3dc1 commit d1f0fed

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

src/can.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void enable_acceptance_filter()
111111
value(can_commands::accept_all_messages);
112112
}
113113

114-
bool has_data(can_reg_t* p_reg)
114+
[[maybe_unused]] bool has_data(can_reg_t* p_reg)
115115
{
116116
return bit_extract<can_global_status::receive_buffer>(p_reg->GSR);
117117
}

tests/CMakeLists.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,27 @@ else()
4040
endif()
4141

4242
find_package(ut REQUIRED CONFIG)
43+
find_package(libhal REQUIRED CONFIG)
44+
find_package(libhal-armcortex REQUIRED CONFIG)
45+
find_package(libhal-util REQUIRED CONFIG)
46+
find_package(ring-span-lite REQUIRED CONFIG)
4347

4448
add_executable(unit_test
49+
50+
# Sources
51+
../src/adc.cpp
52+
../src/can.cpp
53+
../src/clock.cpp
54+
../src/i2c.cpp
55+
../src/input_pin.cpp
56+
../src/interrupt_pin.cpp
57+
../src/output_pin.cpp
58+
../src/pin.cpp
59+
../src/power.cpp
60+
../src/pwm.cpp
61+
../src/uart.cpp
62+
63+
# Tests
4564
adc.test.cpp
4665
input_pin.test.cpp
4766
output_pin.test.cpp
@@ -77,4 +96,7 @@ target_link_options(unit_test PRIVATE
7796

7897
target_link_libraries(unit_test PRIVATE
7998
boost-ext-ut::ut
80-
libhal-lpc40)
99+
libhal::libhal
100+
libhal::armcortex
101+
libhal::util
102+
nonstd::ring-span-lite)

0 commit comments

Comments
 (0)