parent
1958b262ee
commit
e219925fac
@ -0,0 +1 @@ |
||||
idf_component_register(SRCS "catch_runner.cpp" INCLUDE_DIRS "include") |
@ -0,0 +1,10 @@ |
||||
#include "catch_runner.hpp" |
||||
|
||||
#define CATCH_CONFIG_RUNNER |
||||
#include "catch2/catch.hpp" |
||||
|
||||
void run_catch(void) { |
||||
int argc = 1; |
||||
char *argv = "catch2"; |
||||
Catch::Session().run( argc, &argv ); |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,3 @@ |
||||
#pragma once |
||||
|
||||
void run_catch(void); |
@ -1 +1 @@ |
||||
idf_component_register(SRC_DIRS "." INCLUDE_DIRS "." REQUIRES cmock drivers) |
||||
idf_component_register(SRC_DIRS "." INCLUDE_DIRS "." REQUIRES catch2 cmock drivers) |
||||
|
@ -1,9 +1,9 @@ |
||||
#include "unity.h" |
||||
#include "catch2/catch.hpp" |
||||
|
||||
TEST_CASE("Example test case", "[cooltag]") { |
||||
TEST_ASSERT_EQUAL(0, 0); |
||||
REQUIRE ( 1 == 1 ); |
||||
} |
||||
|
||||
TEST_CASE("test that doesn't run", "[cooltag][ignore]") { |
||||
TEST_ASSERT_EQUAL(0, 1); |
||||
REQUIRE ( 0 == 1 ); |
||||
} |
||||
|
@ -1 +1 @@ |
||||
idf_component_register(SRCS "main.c" INCLUDE_DIRS ".") |
||||
idf_component_register(SRCS "main.cpp" INCLUDE_DIRS "." REQUIRE "catch2") |
||||
|
@ -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); |
||||
} |
||||
|
@ -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); |
||||
} |
||||
|
Loading…
Reference in new issue