Prepare unit tests for LEDs

pull/13/head
D.R.racer 2021-05-25 12:33:50 +02:00
parent 9226230fd5
commit c377674aee
3 changed files with 19 additions and 0 deletions

View File

@ -1,2 +1,3 @@
add_subdirectory(buttons) add_subdirectory(buttons)
add_subdirectory(leds)
add_subdirectory(protocol) add_subdirectory(protocol)

View File

@ -0,0 +1,10 @@
# define the test executable
add_executable(leds_tests ../../../../src/modules/leds.cpp test_leds.cpp)
# define required search paths
target_include_directories(
leds_tests PUBLIC ${CMAKE_SOURCE_DIR}/src/modules ${CMAKE_SOURCE_DIR}/src/hal
)
# tell build system about the test case
add_catch_test(leds_tests)

View File

@ -0,0 +1,8 @@
#include "catch2/catch.hpp"
#include "leds.h"
using Catch::Matchers::Equals;
TEST_CASE("leds::basic", "[leds]") {
using namespace modules::leds;
}