2 Commits

3 changed files with 30 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
idf_component_register(SRCS_DIRS "." # The following lines of boilerplate have to be in your project's CMakeLists
INCLUDE_DIRS "." # in this exact order for cmake to work correctly
REQUIRES unity relay_chn) cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components"
"../../relay_chn")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(relay_chn_test)

3
test/main/CMakeLists.txt Normal file
View File

@@ -0,0 +1,3 @@
idf_component_register(SRCS_DIRS "."
PRIV_INCLUDE_DIRS "."
PRIV_REQUIRES unity test_utils relay_chn)

View File

@@ -75,3 +75,21 @@ TEST_CASE("Relay channels do not change state for invalid channel", "[relay_chn]
relay_chn_flip_direction(relay_chn_count + 1); // Flip the direction relay_chn_flip_direction(relay_chn_count + 1); // Flip the direction
check_channels_state_unchanged(); check_channels_state_unchanged();
} }
void setUp(void)
{
// Run before each test
}
void tearDown(void)
{
// Run after each test
}
// Test app entry point
void app_main(void)
{
// Run the Unity tests menu
unity_run_menu();
}