From 41ee499e632e0432069bd9efbeeeb3245e160750 Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Mon, 13 Mar 2017 16:46:41 -0400 Subject: [PATCH] Tiny tweaks to make Unity fit in more smoothly with Ceedling --- auto/generate_test_runner.rb | 1 + src/unity.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/auto/generate_test_runner.rb b/auto/generate_test_runner.rb index 8e8e5bb..5c5ead4 100644 --- a/auto/generate_test_runner.rb +++ b/auto/generate_test_runner.rb @@ -27,6 +27,7 @@ class UnityTestRunnerGenerator :plugins => [], :framework => :unity, :test_prefix => "test|spec|should", + :mock_prefix => "Mock", :setup_name => "setUp", :teardown_name => "tearDown", :main_name => "main", #set to :auto to automatically generate each time diff --git a/src/unity.h b/src/unity.h index 30d0e91..2cdd151 100644 --- a/src/unity.h +++ b/src/unity.h @@ -74,6 +74,10 @@ void tearDown(void); * This method allows you to abort a test immediately with a PASS state, ignoring the remainder of the test. */ #define TEST_PASS() TEST_ABORT() +/* This macro does nothing, but it is useful for build tools (like Ceedling) to make use of this to figure out + * which files should be linked to in order to perform a test. Use it like TEST_FILE("sandwiches.c") */ +#define TEST_FILE(a) + /*------------------------------------------------------- * Test Asserts (simple) *-------------------------------------------------------*/ -- GitLab