2 Commits

Author SHA1 Message Date
d64370c925 Unify test source files. 2025-02-11 14:41:24 +03:00
b47244b5d1 Move relay_chn.c into src directory. 2025-02-11 14:40:37 +03:00
4 changed files with 11 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
idf_component_register(SRCS "relay_chn.c"
idf_component_register(SRCS "src/relay_chn.c"
INCLUDE_DIRS include
REQUIRES driver
PRIV_REQUIRES esp_timer esp_event)

View File

@@ -72,4 +72,13 @@ TEST_CASE("Relay channels do not change state for invalid channel", "[relay_chn]
check_channels_state_unchanged();
relay_chn_flip_direction(relay_chn_count + 1); // Flip the direction
check_channels_state_unchanged();
}
}
// Test app entry point
void app_main(void)
{
// Run the Unity tests menu
unity_run_menu();
}

View File

@@ -1,21 +0,0 @@
#include <stdio.h>
#include <string.h>
#include "unity.h"
#include "unity_test_runner.h"
static void print_banner(const char*);
void app_main(void) {
print_banner("Starting interactive test menu");
/* This function will not return, and will be busy waiting for UART input.
* Make sure that task watchdog is disabled if you use this function.
*/
unity_run_menu();
}
static void print_banner(const char* text)
{
printf("\n##### %s #####\n\n", text);
}