From c377674aeeaee308c929fd133407b06218a65ef2 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Tue, 25 May 2021 12:33:50 +0200 Subject: [PATCH] Prepare unit tests for LEDs --- tests/unit/modules/CMakeLists.txt | 1 + tests/unit/modules/leds/CMakeLists.txt | 10 ++++++++++ tests/unit/modules/leds/test_leds.cpp | 8 ++++++++ 3 files changed, 19 insertions(+) create mode 100644 tests/unit/modules/leds/CMakeLists.txt create mode 100644 tests/unit/modules/leds/test_leds.cpp diff --git a/tests/unit/modules/CMakeLists.txt b/tests/unit/modules/CMakeLists.txt index 4203bf3..442fa8a 100644 --- a/tests/unit/modules/CMakeLists.txt +++ b/tests/unit/modules/CMakeLists.txt @@ -1,2 +1,3 @@ add_subdirectory(buttons) +add_subdirectory(leds) add_subdirectory(protocol) diff --git a/tests/unit/modules/leds/CMakeLists.txt b/tests/unit/modules/leds/CMakeLists.txt new file mode 100644 index 0000000..9f39584 --- /dev/null +++ b/tests/unit/modules/leds/CMakeLists.txt @@ -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) diff --git a/tests/unit/modules/leds/test_leds.cpp b/tests/unit/modules/leds/test_leds.cpp new file mode 100644 index 0000000..68a9cff --- /dev/null +++ b/tests/unit/modules/leds/test_leds.cpp @@ -0,0 +1,8 @@ +#include "catch2/catch.hpp" +#include "leds.h" + +using Catch::Matchers::Equals; + +TEST_CASE("leds::basic", "[leds]") { + using namespace modules::leds; +}