mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-12-17 22:08:07 +08:00
Merge pull request #296 from jlindgren90/master
Allow suiteSetUp() and suiteTearDown() to be provided as normal C functions (Thanks @jlindgren90 )
This commit is contained in:
12
src/unity.c
12
src/unity.c
@@ -4,6 +4,7 @@
|
||||
[Released under MIT License. Please refer to license.txt for details]
|
||||
============================================================================ */
|
||||
|
||||
#define UNITY_INCLUDE_SETUP_STUBS
|
||||
#include "unity.h"
|
||||
#include <stddef.h>
|
||||
|
||||
@@ -1325,17 +1326,6 @@ void UnityIgnore(const char* msg, const UNITY_LINE_TYPE line)
|
||||
UNITY_IGNORE_AND_BAIL;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------*/
|
||||
#if defined(UNITY_WEAK_ATTRIBUTE)
|
||||
UNITY_WEAK_ATTRIBUTE void setUp(void) { }
|
||||
UNITY_WEAK_ATTRIBUTE void tearDown(void) { }
|
||||
#elif defined(UNITY_WEAK_PRAGMA)
|
||||
#pragma weak setUp
|
||||
void setUp(void) { }
|
||||
#pragma weak tearDown
|
||||
void tearDown(void) { }
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------*/
|
||||
void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user