From e219925fac2d9b0b054445ac9c094d51ae30fd17 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 8 Nov 2022 10:55:42 +1100 Subject: WIP use catch2 instead of unity --- test/main/CMakeLists.txt | 2 +- test/main/main.c | 22 ---------------------- test/main/main.cpp | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 23 deletions(-) delete mode 100644 test/main/main.c create mode 100644 test/main/main.cpp (limited to 'test') diff --git a/test/main/CMakeLists.txt b/test/main/CMakeLists.txt index 52a3b94c..687802d4 100644 --- a/test/main/CMakeLists.txt +++ b/test/main/CMakeLists.txt @@ -1 +1 @@ -idf_component_register(SRCS "main.c" INCLUDE_DIRS ".") +idf_component_register(SRCS "main.cpp" INCLUDE_DIRS "." REQUIRE "catch2") diff --git a/test/main/main.c b/test/main/main.c deleted file mode 100644 index 6806aa2e..00000000 --- a/test/main/main.c +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include -#include "unity.h" - -static void print_banner(const char* text); - -void app_main(void) -{ - print_banner("Running tests without [ignore] tag"); - UNITY_BEGIN(); - unity_run_tests_by_tag("[ignore]", true); - UNITY_END(); - - print_banner("Starting interactive test menu"); - unity_run_menu(); -} - -static void print_banner(const char* text) -{ - printf("\n#### %s #####\n\n", text); -} - diff --git a/test/main/main.cpp b/test/main/main.cpp new file mode 100644 index 00000000..06e733c4 --- /dev/null +++ b/test/main/main.cpp @@ -0,0 +1,17 @@ +#include +#include + +static void print_banner(const char* text); + +extern "C" { + void app_main(void) + { + print_banner("Running tests without [ignore] tag"); + } +} + +static void print_banner(const char* text) +{ + printf("\n#### %s #####\n\n", text); +} + -- cgit v1.2.3