From 693417847b26d82ff76469fb15735dd46a56a085 Mon Sep 17 00:00:00 2001 From: jsalling Date: Fri, 15 Jan 2016 22:35:43 -0600 Subject: [PATCH] Remove unnecessary stdio.h dependency and clean up Fixture Delete unused variables and empty functions Make setUp & tearDown (used in Unity core) optionally defined if 'weak' linking is present --- extras/fixture/src/unity_fixture.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/extras/fixture/src/unity_fixture.c b/extras/fixture/src/unity_fixture.c index 240661f..1daf0de 100644 --- a/extras/fixture/src/unity_fixture.c +++ b/extras/fixture/src/unity_fixture.c @@ -6,21 +6,19 @@ ========================================== */ #include -#include #include "unity_fixture.h" #include "unity_internals.h" UNITY_FIXTURE_T UnityFixture; //If you decide to use the function pointer approach. -int (*outputChar)(int) = putchar; +//Build with -D UNITY_OUTPUT_CHAR=outputChar and include +//int (*outputChar)(int) = putchar; -int verbose = 0; - -void setUp(void); -void tearDown(void); +#if !defined(UNITY_WEAK_ATTRIBUTE) && !defined(UNITY_WEAK_PRAGMA) void setUp(void) { /*does nothing*/ } void tearDown(void) { /*does nothing*/ } +#endif static void announceTestRun(unsigned int runNumber) { @@ -67,11 +65,6 @@ static int groupSelected(const char* group) return selected(UnityFixture.GroupFilter, group); } -static void runTestCase(void) -{ - -} - void UnityTestRunner(unityfunction* setup, unityfunction* testBody, unityfunction* teardown, @@ -95,7 +88,6 @@ void UnityTestRunner(unityfunction* setup, UnityMalloc_StartTest(); UnityPointer_Init(); - runTestCase(); if (TEST_PROTECT()) { setup(); @@ -174,7 +166,6 @@ void UnityMalloc_MakeMallocFailAfterCount(int countdown) #endif #include -#include typedef struct GuardBytes { -- GitLab