summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/main/CMakeLists.txt2
-rw-r--r--test/main/main.c22
-rw-r--r--test/main/main.cpp17
3 files changed, 18 insertions, 23 deletions
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 <stdio.h>
-#include <string.h>
-#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 <stdio.h>
+#include <string.h>
+
+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);
+}
+