Add a unit test app + example tests

This commit is contained in:
jacqueline
2022-11-07 16:38:58 +11:00
parent c29c218b85
commit 6584060296
10 changed files with 86 additions and 32 deletions
+1
View File
@@ -0,0 +1 @@
idf_component_register(SRCS "main.c" INCLUDE_DIRS ".")
+22
View File
@@ -0,0 +1,22 @@
#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);
}