summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2022-11-08 10:55:42 +1100
committerjacqueline <me@jacqueline.id.au>2022-11-08 10:55:42 +1100
commite219925fac2d9b0b054445ac9c094d51ae30fd17 (patch)
tree676c36f897a5eedcfa69ef9b98ceb5eeedb62b54 /test
parent1958b262ee84960c65ebf1d465c8c7d80e32b58c (diff)
downloadtangara-fw-e219925fac2d9b0b054445ac9c094d51ae30fd17.tar.gz
WIP use catch2 instead of unity
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);
+}
+