Change comments style in unity and test runner to compile with std=c89

This commit is contained in:
Andrzej Bieniek
2015-09-09 21:09:59 +01:00
parent a5a927f43e
commit 61dd3f181b
22 changed files with 362 additions and 362 deletions

View File

@ -158,7 +158,7 @@ class UnityTestRunnerGenerator
def create_header(output, mocks, testfile_includes=[]) def create_header(output, mocks, testfile_includes=[])
output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */') output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */')
create_runtest(output, mocks) create_runtest(output, mocks)
output.puts("\n//=======Automagically Detected Files To Include=====") output.puts("\n/*=======Automagically Detected Files To Include=====*/")
output.puts("#include \"#{@options[:framework].to_s}.h\"") output.puts("#include \"#{@options[:framework].to_s}.h\"")
output.puts('#include "cmock.h"') unless (mocks.empty?) output.puts('#include "cmock.h"') unless (mocks.empty?)
output.puts('#include <setjmp.h>') output.puts('#include <setjmp.h>')
@ -186,7 +186,7 @@ class UnityTestRunnerGenerator
end end
def create_externs(output, tests, mocks) def create_externs(output, tests, mocks)
output.puts("\n//=======External Functions This Runner Calls=====") output.puts("\n/*=======External Functions This Runner Calls=====*/")
output.puts("extern void #{@options[:setup_name]}(void);") output.puts("extern void #{@options[:setup_name]}(void);")
output.puts("extern void #{@options[:teardown_name]}(void);") output.puts("extern void #{@options[:teardown_name]}(void);")
tests.each do |test| tests.each do |test|
@ -197,7 +197,7 @@ class UnityTestRunnerGenerator
def create_mock_management(output, mock_headers) def create_mock_management(output, mock_headers)
unless (mock_headers.empty?) unless (mock_headers.empty?)
output.puts("\n//=======Mock Management=====") output.puts("\n/*=======Mock Management=====*/")
output.puts("static void CMock_Init(void)") output.puts("static void CMock_Init(void)")
output.puts("{") output.puts("{")
if @options[:enforce_strict_ordering] if @options[:enforce_strict_ordering]
@ -232,14 +232,14 @@ class UnityTestRunnerGenerator
def create_suite_setup_and_teardown(output) def create_suite_setup_and_teardown(output)
unless (@options[:suite_setup].nil?) unless (@options[:suite_setup].nil?)
output.puts("\n//=======Suite Setup=====") output.puts("\n/*=======Suite Setup=====*/")
output.puts("static int suite_setup(void)") output.puts("static int suite_setup(void)")
output.puts("{") output.puts("{")
output.puts(@options[:suite_setup]) output.puts(@options[:suite_setup])
output.puts("}") output.puts("}")
end end
unless (@options[:suite_teardown].nil?) unless (@options[:suite_teardown].nil?)
output.puts("\n//=======Suite Teardown=====") output.puts("\n/*=======Suite Teardown=====*/")
output.puts("static int suite_teardown(int num_failures)") output.puts("static int suite_teardown(int num_failures)")
output.puts("{") output.puts("{")
output.puts(@options[:suite_teardown]) output.puts(@options[:suite_teardown])
@ -251,7 +251,7 @@ class UnityTestRunnerGenerator
cexception = @options[:plugins].include? :cexception cexception = @options[:plugins].include? :cexception
va_args1 = @options[:use_param_tests] ? ', ...' : '' va_args1 = @options[:use_param_tests] ? ', ...' : ''
va_args2 = @options[:use_param_tests] ? '__VA_ARGS__' : '' va_args2 = @options[:use_param_tests] ? '__VA_ARGS__' : ''
output.puts("\n//=======Test Runner Used To Run Each Test Below=====") output.puts("\n/*=======Test Runner Used To Run Each Test Below=====*/")
output.puts("#define RUN_TEST_NO_ARGS") if @options[:use_param_tests] output.puts("#define RUN_TEST_NO_ARGS") if @options[:use_param_tests]
output.puts("#define RUN_TEST(TestFunc, TestLineNum#{va_args1}) \\") output.puts("#define RUN_TEST(TestFunc, TestLineNum#{va_args1}) \\")
output.puts("{ \\") output.puts("{ \\")
@ -279,7 +279,7 @@ class UnityTestRunnerGenerator
end end
def create_reset(output, used_mocks) def create_reset(output, used_mocks)
output.puts("\n//=======Test Reset Option=====") output.puts("\n/*=======Test Reset Option=====*/")
output.puts("void resetTest(void);") output.puts("void resetTest(void);")
output.puts("void resetTest(void)") output.puts("void resetTest(void)")
output.puts("{") output.puts("{")
@ -292,7 +292,7 @@ class UnityTestRunnerGenerator
end end
def create_main(output, filename, tests, used_mocks) def create_main(output, filename, tests, used_mocks)
output.puts("\n\n//=======MAIN=====") output.puts("\n\n/*=======MAIN=====*/")
if (@options[:main_name] != "main") if (@options[:main_name] != "main")
output.puts("int #{@options[:main_name]}(void);") output.puts("int #{@options[:main_name]}(void);")
end end

View File

@ -7,7 +7,7 @@
#include "unity.h" #include "unity.h"
#include <stddef.h> #include <stddef.h>
//If omitted from header, declare overrideable prototypes here so they're ready for use /* If omitted from header, declare overrideable prototypes here so they're ready for use */
#ifdef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION #ifdef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION
int UNITY_OUTPUT_CHAR(int); int UNITY_OUTPUT_CHAR(int);
#endif #endif
@ -15,11 +15,11 @@ int UNITY_OUTPUT_CHAR(int);
int UNITY_OUTPUT_FLUSH(void); int UNITY_OUTPUT_FLUSH(void);
#endif #endif
//Helpful macros for us to use here /* Helpful macros for us to use here */
#define UNITY_FAIL_AND_BAIL { Unity.CurrentTestFailed = 1; longjmp(Unity.AbortFrame, 1); } #define UNITY_FAIL_AND_BAIL { Unity.CurrentTestFailed = 1; longjmp(Unity.AbortFrame, 1); }
#define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; longjmp(Unity.AbortFrame, 1); } #define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; longjmp(Unity.AbortFrame, 1); }
/// return prematurely if we are already in failure or ignore state /* return prematurely if we are already in failure or ignore state */
#define UNITY_SKIP_EXECUTION { if ((Unity.CurrentTestFailed != 0) || (Unity.CurrentTestIgnored != 0)) {return;} } #define UNITY_SKIP_EXECUTION { if ((Unity.CurrentTestFailed != 0) || (Unity.CurrentTestIgnored != 0)) {return;} }
struct _Unity Unity; struct _Unity Unity;
@ -56,18 +56,18 @@ static const char UnityStrDetail1Name[] = UNITY_DETAIL1_NAME " ";
static const char UnityStrDetail2Name[] = " " UNITY_DETAIL2_NAME " "; static const char UnityStrDetail2Name[] = " " UNITY_DETAIL2_NAME " ";
#ifdef UNITY_FLOAT_NEEDS_ZERO #ifdef UNITY_FLOAT_NEEDS_ZERO
// Dividing by these constants produces +/- infinity. /* Dividing by these constants produces +/- infinity.
// The rationale is given in UnityAssertFloatIsInf's body. * The rationale is given in UnityAssertFloatIsInf's body. */
static const _UF f_zero = 0.0f; static const _UF f_zero = 0.0f;
#endif #endif
// compiler-generic print formatting masks /* compiler-generic print formatting masks */
static const _U_UINT UnitySizeMask[] = static const _U_UINT UnitySizeMask[] =
{ {
255u, // 0xFF 255u, /* 0xFF */
65535u, // 0xFFFF 65535u, /* 0xFFFF */
65535u, 65535u,
4294967295u, // 0xFFFFFFFF 4294967295u, /* 0xFFFFFFFF */
4294967295u, 4294967295u,
4294967295u, 4294967295u,
4294967295u 4294967295u
@ -76,9 +76,9 @@ static const _U_UINT UnitySizeMask[] =
#endif #endif
}; };
//----------------------------------------------- /*-----------------------------------------------
// Pretty Printers & Test Result Output Handlers * Pretty Printers & Test Result Output Handlers
//----------------------------------------------- *-----------------------------------------------*/
void UnityPrint(const char* string) void UnityPrint(const char* string)
{ {
@ -88,24 +88,24 @@ void UnityPrint(const char* string)
{ {
while (*pch) while (*pch)
{ {
// printable characters plus CR & LF are printed /* printable characters plus CR & LF are printed */
if ((*pch <= 126) && (*pch >= 32)) if ((*pch <= 126) && (*pch >= 32))
{ {
UNITY_OUTPUT_CHAR(*pch); UNITY_OUTPUT_CHAR(*pch);
} }
//write escaped carriage returns /* write escaped carriage returns */
else if (*pch == 13) else if (*pch == 13)
{ {
UNITY_OUTPUT_CHAR('\\'); UNITY_OUTPUT_CHAR('\\');
UNITY_OUTPUT_CHAR('r'); UNITY_OUTPUT_CHAR('r');
} }
//write escaped line feeds /* write escaped line feeds */
else if (*pch == 10) else if (*pch == 10)
{ {
UNITY_OUTPUT_CHAR('\\'); UNITY_OUTPUT_CHAR('\\');
UNITY_OUTPUT_CHAR('n'); UNITY_OUTPUT_CHAR('n');
} }
// unprintable characters are shown as codes /* unprintable characters are shown as codes */
else else
{ {
UNITY_OUTPUT_CHAR('\\'); UNITY_OUTPUT_CHAR('\\');
@ -125,24 +125,24 @@ void UnityPrintLen(const char* string, const _UU32 length)
{ {
while (*pch && (_UU32)(pch - string) < length) while (*pch && (_UU32)(pch - string) < length)
{ {
// printable characters plus CR & LF are printed /* printable characters plus CR & LF are printed */
if ((*pch <= 126) && (*pch >= 32)) if ((*pch <= 126) && (*pch >= 32))
{ {
UNITY_OUTPUT_CHAR(*pch); UNITY_OUTPUT_CHAR(*pch);
} }
//write escaped carriage returns /* write escaped carriage returns */
else if (*pch == 13) else if (*pch == 13)
{ {
UNITY_OUTPUT_CHAR('\\'); UNITY_OUTPUT_CHAR('\\');
UNITY_OUTPUT_CHAR('r'); UNITY_OUTPUT_CHAR('r');
} }
//write escaped line feeds /* write escaped line feeds */
else if (*pch == 10) else if (*pch == 10)
{ {
UNITY_OUTPUT_CHAR('\\'); UNITY_OUTPUT_CHAR('\\');
UNITY_OUTPUT_CHAR('n'); UNITY_OUTPUT_CHAR('n');
} }
// unprintable characters are shown as codes /* unprintable characters are shown as codes */
else else
{ {
UNITY_OUTPUT_CHAR('\\'); UNITY_OUTPUT_CHAR('\\');
@ -153,7 +153,7 @@ void UnityPrintLen(const char* string, const _UU32 length)
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityPrintNumberByStyle(const _U_SINT number, const UNITY_DISPLAY_STYLE_T style) void UnityPrintNumberByStyle(const _U_SINT number, const UNITY_DISPLAY_STYLE_T style)
{ {
if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
@ -170,33 +170,33 @@ void UnityPrintNumberByStyle(const _U_SINT number, const UNITY_DISPLAY_STYLE_T s
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityPrintNumber(const _U_SINT number_to_print) void UnityPrintNumber(const _U_SINT number_to_print)
{ {
_U_UINT number = (_U_UINT)number_to_print; _U_UINT number = (_U_UINT)number_to_print;
if (number_to_print < 0) if (number_to_print < 0)
{ {
//A negative number, including MIN negative /* A negative number, including MIN negative */
UNITY_OUTPUT_CHAR('-'); UNITY_OUTPUT_CHAR('-');
number = (_U_UINT)(-number_to_print); number = (_U_UINT)(-number_to_print);
} }
UnityPrintNumberUnsigned(number); UnityPrintNumberUnsigned(number);
} }
//----------------------------------------------- /*-----------------------------------------------
/// basically do an itoa using as little ram as possible * basically do an itoa using as little ram as possible */
void UnityPrintNumberUnsigned(const _U_UINT number) void UnityPrintNumberUnsigned(const _U_UINT number)
{ {
_U_UINT divisor = 1; _U_UINT divisor = 1;
// figure out initial divisor /* figure out initial divisor */
while (number / divisor > 9) while (number / divisor > 9)
{ {
divisor *= 10; divisor *= 10;
} }
// now mod and print, then divide divisor /* now mod and print, then divide divisor */
do do
{ {
UNITY_OUTPUT_CHAR((char)('0' + (number / divisor % 10))); UNITY_OUTPUT_CHAR((char)('0' + (number / divisor % 10)));
@ -205,7 +205,7 @@ void UnityPrintNumberUnsigned(const _U_UINT number)
while (divisor > 0); while (divisor > 0);
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityPrintNumberHex(const _U_UINT number, const char nibbles_to_print) void UnityPrintNumberHex(const _U_UINT number, const char nibbles_to_print)
{ {
_U_UINT nibble; _U_UINT nibble;
@ -227,7 +227,7 @@ void UnityPrintNumberHex(const _U_UINT number, const char nibbles_to_print)
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityPrintMask(const _U_UINT mask, const _U_UINT number) void UnityPrintMask(const _U_UINT mask, const _U_UINT number)
{ {
_U_UINT current_bit = (_U_UINT)1 << (UNITY_INT_WIDTH - 1); _U_UINT current_bit = (_U_UINT)1 << (UNITY_INT_WIDTH - 1);
@ -254,7 +254,7 @@ void UnityPrintMask(const _U_UINT mask, const _U_UINT number)
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
#ifdef UNITY_FLOAT_VERBOSE #ifdef UNITY_FLOAT_VERBOSE
#include <stdio.h> #include <stdio.h>
@ -274,7 +274,7 @@ void UnityPrintFloat(_UF number)
} }
#endif #endif
//----------------------------------------------- /*-----------------------------------------------*/
void UnityPrintFail(void); void UnityPrintFail(void);
void UnityPrintFail(void) void UnityPrintFail(void)
@ -288,7 +288,7 @@ void UnityPrintOk(void)
UnityPrint(UnityStrOk); UnityPrint(UnityStrOk);
} }
//----------------------------------------------- /*-----------------------------------------------*/
static void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line); static void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line);
static void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line) static void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line)
{ {
@ -305,7 +305,7 @@ static void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line)
#endif #endif
} }
//----------------------------------------------- /*-----------------------------------------------*/
static void UnityTestResultsFailBegin(const UNITY_LINE_TYPE line); static void UnityTestResultsFailBegin(const UNITY_LINE_TYPE line);
static void UnityTestResultsFailBegin(const UNITY_LINE_TYPE line) static void UnityTestResultsFailBegin(const UNITY_LINE_TYPE line)
{ {
@ -318,7 +318,7 @@ static void UnityTestResultsFailBegin(const UNITY_LINE_TYPE line)
UNITY_OUTPUT_CHAR(':'); UNITY_OUTPUT_CHAR(':');
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityConcludeTest(void) void UnityConcludeTest(void)
{ {
if (Unity.CurrentTestIgnored) if (Unity.CurrentTestIgnored)
@ -341,7 +341,7 @@ void UnityConcludeTest(void)
UNITY_OUTPUT_FLUSH(); UNITY_OUTPUT_FLUSH();
} }
//----------------------------------------------- /*-----------------------------------------------*/
static void UnityAddMsgIfSpecified(const char* msg); static void UnityAddMsgIfSpecified(const char* msg);
static void UnityAddMsgIfSpecified(const char* msg) static void UnityAddMsgIfSpecified(const char* msg)
{ {
@ -365,7 +365,7 @@ static void UnityAddMsgIfSpecified(const char* msg)
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
static void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual); static void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual);
static void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual) static void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual)
{ {
@ -393,7 +393,7 @@ static void UnityPrintExpectedAndActualStrings(const char* expected, const char*
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
static void UnityPrintExpectedAndActualStringsLen(const char* expected, const char* actual, const _UU32 length) static void UnityPrintExpectedAndActualStringsLen(const char* expected, const char* actual, const _UU32 length)
{ {
UnityPrint(UnityStrExpected); UnityPrint(UnityStrExpected);
@ -422,17 +422,17 @@ static void UnityPrintExpectedAndActualStringsLen(const char* expected, const ch
//----------------------------------------------- /*-----------------------------------------------
// Assertion & Control Helpers * Assertion & Control Helpers
//----------------------------------------------- *-----------------------------------------------*/
static int UnityCheckArraysForNull(UNITY_INTERNAL_PTR expected, UNITY_INTERNAL_PTR actual, const UNITY_LINE_TYPE lineNumber, const char* msg) static int UnityCheckArraysForNull(UNITY_INTERNAL_PTR expected, UNITY_INTERNAL_PTR actual, const UNITY_LINE_TYPE lineNumber, const char* msg)
{ {
//return true if they are both NULL /* return true if they are both NULL */
if ((expected == NULL) && (actual == NULL)) if ((expected == NULL) && (actual == NULL))
return 1; return 1;
//throw error if just expected is NULL /* throw error if just expected is NULL */
if (expected == NULL) if (expected == NULL)
{ {
UnityTestResultsFailBegin(lineNumber); UnityTestResultsFailBegin(lineNumber);
@ -441,7 +441,7 @@ static int UnityCheckArraysForNull(UNITY_INTERNAL_PTR expected, UNITY_INTERNAL_P
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }
//throw error if just actual is NULL /* throw error if just actual is NULL */
if (actual == NULL) if (actual == NULL)
{ {
UnityTestResultsFailBegin(lineNumber); UnityTestResultsFailBegin(lineNumber);
@ -450,13 +450,13 @@ static int UnityCheckArraysForNull(UNITY_INTERNAL_PTR expected, UNITY_INTERNAL_P
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }
//return false if neither is NULL /* return false if neither is NULL */
return 0; return 0;
} }
//----------------------------------------------- /*-----------------------------------------------
// Assertion Functions * Assertion Functions
//----------------------------------------------- *-----------------------------------------------*/
void UnityAssertBits(const _U_SINT mask, void UnityAssertBits(const _U_SINT mask,
const _U_SINT expected, const _U_SINT expected,
@ -478,7 +478,7 @@ void UnityAssertBits(const _U_SINT mask,
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityAssertEqualNumber(const _U_SINT expected, void UnityAssertEqualNumber(const _U_SINT expected,
const _U_SINT actual, const _U_SINT actual,
const char* msg, const char* msg,
@ -506,7 +506,7 @@ void UnityAssertEqualNumber(const _U_SINT expected,
UnityAddMsgIfSpecified(msg); \ UnityAddMsgIfSpecified(msg); \
UNITY_FAIL_AND_BAIL; } UNITY_FAIL_AND_BAIL; }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected, void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
UNITY_INTERNAL_PTR actual, UNITY_INTERNAL_PTR actual,
const _UU32 num_elements, const _UU32 num_elements,
@ -528,9 +528,9 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
if (UnityCheckArraysForNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg) == 1) if (UnityCheckArraysForNull((UNITY_INTERNAL_PTR)expected, (UNITY_INTERNAL_PTR)actual, lineNumber, msg) == 1)
return; return;
// If style is UNITY_DISPLAY_STYLE_INT, we'll fall into the default case rather than the INT16 or INT32 (etc) case /* If style is UNITY_DISPLAY_STYLE_INT, we'll fall into the default case rather than the INT16 or INT32 (etc) case
// as UNITY_DISPLAY_STYLE_INT includes a flag for UNITY_DISPLAY_RANGE_AUTO, which the width-specific * as UNITY_DISPLAY_STYLE_INT includes a flag for UNITY_DISPLAY_RANGE_AUTO, which the width-specific
// variants do not. Therefore remove this flag. * variants do not. Therefore remove this flag. */
switch(style & (UNITY_DISPLAY_STYLE_T)(~UNITY_DISPLAY_RANGE_AUTO)) switch(style & (UNITY_DISPLAY_STYLE_T)(~UNITY_DISPLAY_RANGE_AUTO))
{ {
case UNITY_DISPLAY_STYLE_HEX8: case UNITY_DISPLAY_STYLE_HEX8:
@ -620,7 +620,7 @@ void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
#ifndef UNITY_EXCLUDE_FLOAT #ifndef UNITY_EXCLUDE_FLOAT
void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE const _UF* expected, void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE const _UF* expected,
UNITY_PTR_ATTRIBUTE const _UF* actual, UNITY_PTR_ATTRIBUTE const _UF* actual,
@ -652,7 +652,7 @@ void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE const _UF* expected,
if (tol < 0.0f) if (tol < 0.0f)
tol = 0.0f - tol; tol = 0.0f - tol;
//This first part of this condition will catch any NaN or Infinite values /* This first part of this condition will catch any NaN or Infinite values */
if (isnan(diff) || isinf(diff) || (diff > tol)) if (isnan(diff) || isinf(diff) || (diff > tol))
{ {
UnityTestResultsFailBegin(lineNumber); UnityTestResultsFailBegin(lineNumber);
@ -674,7 +674,7 @@ void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE const _UF* expected,
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityAssertFloatsWithin(const _UF delta, void UnityAssertFloatsWithin(const _UF delta,
const _UF expected, const _UF expected,
const _UF actual, const _UF actual,
@ -695,7 +695,7 @@ void UnityAssertFloatsWithin(const _UF delta,
pos_delta = 0.0f - pos_delta; pos_delta = 0.0f - pos_delta;
} }
//This first part of this condition will catch any NaN or Infinite values /* This first part of this condition will catch any NaN or Infinite values */
if (isnan(diff) || isinf(diff) || (pos_delta < diff)) if (isnan(diff) || isinf(diff) || (pos_delta < diff))
{ {
UnityTestResultsFailBegin(lineNumber); UnityTestResultsFailBegin(lineNumber);
@ -712,7 +712,7 @@ void UnityAssertFloatsWithin(const _UF delta,
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityAssertFloatSpecial(const _UF actual, void UnityAssertFloatSpecial(const _UF actual,
const char* msg, const char* msg,
const UNITY_LINE_TYPE lineNumber, const UNITY_LINE_TYPE lineNumber,
@ -727,8 +727,8 @@ void UnityAssertFloatSpecial(const _UF actual,
switch(style) switch(style)
{ {
//To determine Inf / Neg Inf, we compare to an Inf / Neg Inf value we create on the fly /* To determine Inf / Neg Inf, we compare to an Inf / Neg Inf value we create on the fly
//We are using a variable to hold the zero value because some compilers complain about dividing by zero otherwise * We are using a variable to hold the zero value because some compilers complain about dividing by zero otherwise */
case UNITY_FLOAT_IS_INF: case UNITY_FLOAT_IS_INF:
case UNITY_FLOAT_IS_NOT_INF: case UNITY_FLOAT_IS_NOT_INF:
is_trait = isinf(actual) & ispos(actual); is_trait = isinf(actual) & ispos(actual);
@ -738,13 +738,13 @@ void UnityAssertFloatSpecial(const _UF actual,
is_trait = isinf(actual) & isneg(actual); is_trait = isinf(actual) & isneg(actual);
break; break;
//NaN is the only floating point value that does NOT equal itself. Therefore if Actual == Actual, then it is NOT NaN. /* NaN is the only floating point value that does NOT equal itself. Therefore if Actual == Actual, then it is NOT NaN. */
case UNITY_FLOAT_IS_NAN: case UNITY_FLOAT_IS_NAN:
case UNITY_FLOAT_IS_NOT_NAN: case UNITY_FLOAT_IS_NOT_NAN:
is_trait = isnan(actual); is_trait = isnan(actual);
break; break;
//A determinate number is non infinite and not NaN. (therefore the opposite of the two above) /* A determinate number is non infinite and not NaN. (therefore the opposite of the two above) */
case UNITY_FLOAT_IS_DET: case UNITY_FLOAT_IS_DET:
case UNITY_FLOAT_IS_NOT_DET: case UNITY_FLOAT_IS_NOT_DET:
if (isinf(actual) | isnan(actual)) if (isinf(actual) | isnan(actual))
@ -779,9 +779,9 @@ void UnityAssertFloatSpecial(const _UF actual,
} }
} }
#endif //not UNITY_EXCLUDE_FLOAT #endif /* not UNITY_EXCLUDE_FLOAT */
//----------------------------------------------- /*-----------------------------------------------*/
#ifndef UNITY_EXCLUDE_DOUBLE #ifndef UNITY_EXCLUDE_DOUBLE
void UnityAssertEqualDoubleArray(UNITY_PTR_ATTRIBUTE const _UD* expected, void UnityAssertEqualDoubleArray(UNITY_PTR_ATTRIBUTE const _UD* expected,
UNITY_PTR_ATTRIBUTE const _UD* actual, UNITY_PTR_ATTRIBUTE const _UD* actual,
@ -813,7 +813,7 @@ void UnityAssertEqualDoubleArray(UNITY_PTR_ATTRIBUTE const _UD* expected,
if (tol < 0.0) if (tol < 0.0)
tol = 0.0 - tol; tol = 0.0 - tol;
//This first part of this condition will catch any NaN or Infinite values /* This first part of this condition will catch any NaN or Infinite values */
if (isnan(diff) || isinf(diff) || (diff > tol)) if (isnan(diff) || isinf(diff) || (diff > tol))
{ {
UnityTestResultsFailBegin(lineNumber); UnityTestResultsFailBegin(lineNumber);
@ -835,7 +835,7 @@ void UnityAssertEqualDoubleArray(UNITY_PTR_ATTRIBUTE const _UD* expected,
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityAssertDoublesWithin(const _UD delta, void UnityAssertDoublesWithin(const _UD delta,
const _UD expected, const _UD expected,
const _UD actual, const _UD actual,
@ -856,7 +856,7 @@ void UnityAssertDoublesWithin(const _UD delta,
pos_delta = 0.0 - pos_delta; pos_delta = 0.0 - pos_delta;
} }
//This first part of this condition will catch any NaN or Infinite values /* This first part of this condition will catch any NaN or Infinite values */
if (isnan(diff) || isinf(diff) || (pos_delta < diff)) if (isnan(diff) || isinf(diff) || (pos_delta < diff))
{ {
UnityTestResultsFailBegin(lineNumber); UnityTestResultsFailBegin(lineNumber);
@ -873,7 +873,7 @@ void UnityAssertDoublesWithin(const _UD delta,
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityAssertDoubleSpecial(const _UD actual, void UnityAssertDoubleSpecial(const _UD actual,
const char* msg, const char* msg,
@ -889,8 +889,8 @@ void UnityAssertDoubleSpecial(const _UD actual,
switch(style) switch(style)
{ {
//To determine Inf / Neg Inf, we compare to an Inf / Neg Inf value we create on the fly /* To determine Inf / Neg Inf, we compare to an Inf / Neg Inf value we create on the fly
//We are using a variable to hold the zero value because some compilers complain about dividing by zero otherwise * We are using a variable to hold the zero value because some compilers complain about dividing by zero otherwise */
case UNITY_FLOAT_IS_INF: case UNITY_FLOAT_IS_INF:
case UNITY_FLOAT_IS_NOT_INF: case UNITY_FLOAT_IS_NOT_INF:
is_trait = isinf(actual) & ispos(actual); is_trait = isinf(actual) & ispos(actual);
@ -900,13 +900,13 @@ void UnityAssertDoubleSpecial(const _UD actual,
is_trait = isinf(actual) & isneg(actual); is_trait = isinf(actual) & isneg(actual);
break; break;
//NaN is the only floating point value that does NOT equal itself. Therefore if Actual == Actual, then it is NOT NaN. /* NaN is the only floating point value that does NOT equal itself. Therefore if Actual == Actual, then it is NOT NaN. */
case UNITY_FLOAT_IS_NAN: case UNITY_FLOAT_IS_NAN:
case UNITY_FLOAT_IS_NOT_NAN: case UNITY_FLOAT_IS_NOT_NAN:
is_trait = isnan(actual); is_trait = isnan(actual);
break; break;
//A determinate number is non infinite and not NaN. (therefore the opposite of the two above) /* A determinate number is non infinite and not NaN. (therefore the opposite of the two above) */
case UNITY_FLOAT_IS_DET: case UNITY_FLOAT_IS_DET:
case UNITY_FLOAT_IS_NOT_DET: case UNITY_FLOAT_IS_NOT_DET:
if (isinf(actual) | isnan(actual)) if (isinf(actual) | isnan(actual))
@ -942,9 +942,9 @@ void UnityAssertDoubleSpecial(const _UD actual,
} }
#endif // not UNITY_EXCLUDE_DOUBLE #endif /* not UNITY_EXCLUDE_DOUBLE */
//----------------------------------------------- /*-----------------------------------------------*/
void UnityAssertNumbersWithin( const _U_UINT delta, void UnityAssertNumbersWithin( const _U_UINT delta,
const _U_SINT expected, const _U_SINT expected,
const _U_SINT actual, const _U_SINT actual,
@ -983,7 +983,7 @@ void UnityAssertNumbersWithin( const _U_UINT delta,
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityAssertEqualString(const char* expected, void UnityAssertEqualString(const char* expected,
const char* actual, const char* actual,
const char* msg, const char* msg,
@ -993,7 +993,7 @@ void UnityAssertEqualString(const char* expected,
UNITY_SKIP_EXECUTION; UNITY_SKIP_EXECUTION;
// if both pointers not null compare the strings /* if both pointers not null compare the strings */
if (expected && actual) if (expected && actual)
{ {
for (i = 0; expected[i] || actual[i]; i++) for (i = 0; expected[i] || actual[i]; i++)
@ -1006,7 +1006,7 @@ void UnityAssertEqualString(const char* expected,
} }
} }
else else
{ // handle case of one pointers being null (if both null, test should pass) { /* handle case of one pointers being null (if both null, test should pass) */
if (expected != actual) if (expected != actual)
{ {
Unity.CurrentTestFailed = 1; Unity.CurrentTestFailed = 1;
@ -1022,7 +1022,7 @@ void UnityAssertEqualString(const char* expected,
} }
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityAssertEqualStringLen(const char* expected, void UnityAssertEqualStringLen(const char* expected,
const char* actual, const char* actual,
const _UU32 length, const _UU32 length,
@ -1033,7 +1033,7 @@ void UnityAssertEqualStringLen(const char* expected,
UNITY_SKIP_EXECUTION; UNITY_SKIP_EXECUTION;
// if both pointers not null compare the strings /* if both pointers not null compare the strings */
if (expected && actual) if (expected && actual)
{ {
for (i = 0; (expected[i] || actual[i]) && i < length; i++) for (i = 0; (expected[i] || actual[i]) && i < length; i++)
@ -1046,7 +1046,7 @@ void UnityAssertEqualStringLen(const char* expected,
} }
} }
else else
{ // handle case of one pointers being null (if both null, test should pass) { /* handle case of one pointers being null (if both null, test should pass) */
if (expected != actual) if (expected != actual)
{ {
Unity.CurrentTestFailed = 1; Unity.CurrentTestFailed = 1;
@ -1063,7 +1063,7 @@ void UnityAssertEqualStringLen(const char* expected,
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityAssertEqualStringArray( const char** expected, void UnityAssertEqualStringArray( const char** expected,
const char** actual, const char** actual,
const _UU32 num_elements, const _UU32 num_elements,
@ -1074,7 +1074,7 @@ void UnityAssertEqualStringArray( const char** expected,
UNITY_SKIP_EXECUTION; UNITY_SKIP_EXECUTION;
// if no elements, it's an error /* if no elements, it's an error */
if (num_elements == 0) if (num_elements == 0)
{ {
UnityPrintPointlessAndBail(); UnityPrintPointlessAndBail();
@ -1085,7 +1085,7 @@ void UnityAssertEqualStringArray( const char** expected,
do do
{ {
// if both pointers not null compare the strings /* if both pointers not null compare the strings */
if (expected[j] && actual[j]) if (expected[j] && actual[j])
{ {
for (i = 0; expected[j][i] || actual[j][i]; i++) for (i = 0; expected[j][i] || actual[j][i]; i++)
@ -1098,7 +1098,7 @@ void UnityAssertEqualStringArray( const char** expected,
} }
} }
else else
{ // handle case of one pointers being null (if both null, test should pass) { /* handle case of one pointers being null (if both null, test should pass) */
if (expected[j] != actual[j]) if (expected[j] != actual[j])
{ {
Unity.CurrentTestFailed = 1; Unity.CurrentTestFailed = 1;
@ -1120,7 +1120,7 @@ void UnityAssertEqualStringArray( const char** expected,
} while (++j < num_elements); } while (++j < num_elements);
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityAssertEqualMemory( UNITY_INTERNAL_PTR expected, void UnityAssertEqualMemory( UNITY_INTERNAL_PTR expected,
UNITY_INTERNAL_PTR actual, UNITY_INTERNAL_PTR actual,
const _UU32 length, const _UU32 length,
@ -1145,7 +1145,7 @@ void UnityAssertEqualMemory( UNITY_INTERNAL_PTR expected,
while (elements--) while (elements--)
{ {
///////////////////////////////////// /* /////////////////////////////////// */
bytes = length; bytes = length;
while (bytes--) while (bytes--)
{ {
@ -1170,14 +1170,14 @@ void UnityAssertEqualMemory( UNITY_INTERNAL_PTR expected,
ptr_exp = (UNITY_INTERNAL_PTR)((_UP)ptr_exp + 1); ptr_exp = (UNITY_INTERNAL_PTR)((_UP)ptr_exp + 1);
ptr_act = (UNITY_INTERNAL_PTR)((_UP)ptr_act + 1); ptr_act = (UNITY_INTERNAL_PTR)((_UP)ptr_act + 1);
} }
///////////////////////////////////// /* /////////////////////////////////// */
} }
} }
//----------------------------------------------- /*-----------------------------------------------
// Control Functions * Control Functions
//----------------------------------------------- *-----------------------------------------------*/
void UnityFail(const char* msg, const UNITY_LINE_TYPE line) void UnityFail(const char* msg, const UNITY_LINE_TYPE line)
{ {
@ -1212,7 +1212,7 @@ void UnityFail(const char* msg, const UNITY_LINE_TYPE line)
UNITY_FAIL_AND_BAIL; UNITY_FAIL_AND_BAIL;
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityIgnore(const char* msg, const UNITY_LINE_TYPE line) void UnityIgnore(const char* msg, const UNITY_LINE_TYPE line)
{ {
UNITY_SKIP_EXECUTION; UNITY_SKIP_EXECUTION;
@ -1228,7 +1228,7 @@ void UnityIgnore(const char* msg, const UNITY_LINE_TYPE line)
UNITY_IGNORE_AND_BAIL; UNITY_IGNORE_AND_BAIL;
} }
//----------------------------------------------- /*-----------------------------------------------*/
#if defined(UNITY_WEAK_ATTRIBUTE) #if defined(UNITY_WEAK_ATTRIBUTE)
UNITY_WEAK_ATTRIBUTE void setUp(void) { } UNITY_WEAK_ATTRIBUTE void setUp(void) { }
UNITY_WEAK_ATTRIBUTE void tearDown(void) { } UNITY_WEAK_ATTRIBUTE void tearDown(void) { }
@ -1238,7 +1238,7 @@ void UnityIgnore(const char* msg, const UNITY_LINE_TYPE line)
# pragma weak tearDown # pragma weak tearDown
void tearDown(void) { } void tearDown(void) { }
#endif #endif
//----------------------------------------------- /*-----------------------------------------------*/
void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum) void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum)
{ {
Unity.CurrentTestName = FuncName; Unity.CurrentTestName = FuncName;
@ -1257,7 +1257,7 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int
UnityConcludeTest(); UnityConcludeTest();
} }
//----------------------------------------------- /*-----------------------------------------------*/
void UnityBegin(const char* filename) void UnityBegin(const char* filename)
{ {
Unity.TestFile = filename; Unity.TestFile = filename;
@ -1273,7 +1273,7 @@ void UnityBegin(const char* filename)
UNITY_OUTPUT_START(); UNITY_OUTPUT_START();
} }
//----------------------------------------------- /*-----------------------------------------------*/
int UnityEnd(void) int UnityEnd(void)
{ {
UNITY_PRINT_EOL(); UNITY_PRINT_EOL();
@ -1303,4 +1303,4 @@ int UnityEnd(void)
return (int)(Unity.TestFailures); return (int)(Unity.TestFailures);
} }
//----------------------------------------------- /*-----------------------------------------------*/

View File

@ -18,51 +18,51 @@ extern "C"
void setUp(void); void setUp(void);
void tearDown(void); void tearDown(void);
//------------------------------------------------------- /*-------------------------------------------------------
// Configuration Options * Configuration Options
//------------------------------------------------------- *-------------------------------------------------------
// All options described below should be passed as a compiler flag to all files using Unity. If you must add #defines, place them BEFORE the #include above. * All options described below should be passed as a compiler flag to all files using Unity. If you must add #defines, place them BEFORE the #include above.
// Integers/longs/pointers * Integers/longs/pointers
// - Unity attempts to automatically discover your integer sizes * - Unity attempts to automatically discover your integer sizes
// - define UNITY_EXCLUDE_STDINT_H to stop attempting to look in <stdint.h> * - define UNITY_EXCLUDE_STDINT_H to stop attempting to look in <stdint.h>
// - define UNITY_EXCLUDE_LIMITS_H to stop attempting to look in <limits.h> * - define UNITY_EXCLUDE_LIMITS_H to stop attempting to look in <limits.h>
// - define UNITY_EXCLUDE_SIZEOF to stop attempting to use sizeof in macros * - define UNITY_EXCLUDE_SIZEOF to stop attempting to use sizeof in macros
// - If you cannot use the automatic methods above, you can force Unity by using these options: * - If you cannot use the automatic methods above, you can force Unity by using these options:
// - define UNITY_SUPPORT_64 * - define UNITY_SUPPORT_64
// - define UNITY_INT_WIDTH * - define UNITY_INT_WIDTH
// - UNITY_LONG_WIDTH * - UNITY_LONG_WIDTH
// - UNITY_POINTER_WIDTH * - UNITY_POINTER_WIDTH
// Floats * Floats
// - define UNITY_EXCLUDE_FLOAT to disallow floating point comparisons * - define UNITY_EXCLUDE_FLOAT to disallow floating point comparisons
// - define UNITY_FLOAT_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_FLOAT * - define UNITY_FLOAT_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_FLOAT
// - define UNITY_FLOAT_TYPE to specify doubles instead of single precision floats * - define UNITY_FLOAT_TYPE to specify doubles instead of single precision floats
// - define UNITY_FLOAT_VERBOSE to print floating point values in errors (uses sprintf) * - define UNITY_FLOAT_VERBOSE to print floating point values in errors (uses sprintf)
// - define UNITY_INCLUDE_DOUBLE to allow double floating point comparisons * - define UNITY_INCLUDE_DOUBLE to allow double floating point comparisons
// - define UNITY_EXCLUDE_DOUBLE to disallow double floating point comparisons (default) * - define UNITY_EXCLUDE_DOUBLE to disallow double floating point comparisons (default)
// - define UNITY_DOUBLE_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_DOUBLE * - define UNITY_DOUBLE_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_DOUBLE
// - define UNITY_DOUBLE_TYPE to specify something other than double * - define UNITY_DOUBLE_TYPE to specify something other than double
// - define UNITY_DOUBLE_VERBOSE to print floating point values in errors (uses sprintf) * - define UNITY_DOUBLE_VERBOSE to print floating point values in errors (uses sprintf)
// - define UNITY_VERBOSE_NUMBER_MAX_LENGTH to change maximum length of printed numbers (used by sprintf) * - define UNITY_VERBOSE_NUMBER_MAX_LENGTH to change maximum length of printed numbers (used by sprintf)
// Output * Output
// - by default, Unity prints to standard out with putchar. define UNITY_OUTPUT_CHAR(a) with a different function if desired * - by default, Unity prints to standard out with putchar. define UNITY_OUTPUT_CHAR(a) with a different function if desired
// - define UNITY_DIFFERENTIATE_FINAL_FAIL to print FAILED (vs. FAIL) at test end summary - for automated search for failure * - define UNITY_DIFFERENTIATE_FINAL_FAIL to print FAILED (vs. FAIL) at test end summary - for automated search for failure
// Optimization * Optimization
// - by default, line numbers are stored in unsigned shorts. Define UNITY_LINE_TYPE with a different type if your files are huge * - by default, line numbers are stored in unsigned shorts. Define UNITY_LINE_TYPE with a different type if your files are huge
// - by default, test and failure counters are unsigned shorts. Define UNITY_COUNTER_TYPE with a different type if you want to save space or have more than 65535 Tests. * - by default, test and failure counters are unsigned shorts. Define UNITY_COUNTER_TYPE with a different type if you want to save space or have more than 65535 Tests.
// Test Cases * Test Cases
// - define UNITY_SUPPORT_TEST_CASES to include the TEST_CASE macro, though really it's mostly about the runner generator script * - define UNITY_SUPPORT_TEST_CASES to include the TEST_CASE macro, though really it's mostly about the runner generator script
// Parameterized Tests * Parameterized Tests
// - you'll want to create a define of TEST_CASE(...) which basically evaluates to nothing * - you'll want to create a define of TEST_CASE(...) which basically evaluates to nothing
//------------------------------------------------------- *-------------------------------------------------------
// Basic Fail and Ignore * Basic Fail and Ignore
//------------------------------------------------------- *-------------------------------------------------------*/
#define TEST_FAIL_MESSAGE(message) UNITY_TEST_FAIL(__LINE__, (message)) #define TEST_FAIL_MESSAGE(message) UNITY_TEST_FAIL(__LINE__, (message))
#define TEST_FAIL() UNITY_TEST_FAIL(__LINE__, NULL) #define TEST_FAIL() UNITY_TEST_FAIL(__LINE__, NULL)
@ -70,15 +70,15 @@ void tearDown(void);
#define TEST_IGNORE() UNITY_TEST_IGNORE(__LINE__, NULL) #define TEST_IGNORE() UNITY_TEST_IGNORE(__LINE__, NULL)
#define TEST_ONLY() #define TEST_ONLY()
//It is not necessary for you to call PASS. A PASS condition is assumed if nothing fails. /* It is not necessary for you to call PASS. A PASS condition is assumed if nothing fails.
//This method allows you to abort a test immediately with a PASS state, ignoring the remainder of the test. * This method allows you to abort a test immediately with a PASS state, ignoring the remainder of the test. */
#define TEST_PASS() longjmp(Unity.AbortFrame, 1) #define TEST_PASS() longjmp(Unity.AbortFrame, 1)
//------------------------------------------------------- /*-------------------------------------------------------
// Test Asserts (simple) * Test Asserts (simple)
//------------------------------------------------------- *-------------------------------------------------------*/
//Boolean /* Boolean */
#define TEST_ASSERT(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expression Evaluated To FALSE") #define TEST_ASSERT(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expression Evaluated To FALSE")
#define TEST_ASSERT_TRUE(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expected TRUE Was FALSE") #define TEST_ASSERT_TRUE(condition) UNITY_TEST_ASSERT( (condition), __LINE__, " Expected TRUE Was FALSE")
#define TEST_ASSERT_UNLESS(condition) UNITY_TEST_ASSERT( !(condition), __LINE__, " Expression Evaluated To TRUE") #define TEST_ASSERT_UNLESS(condition) UNITY_TEST_ASSERT( !(condition), __LINE__, " Expression Evaluated To TRUE")
@ -86,7 +86,7 @@ void tearDown(void);
#define TEST_ASSERT_NULL(pointer) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, " Expected NULL") #define TEST_ASSERT_NULL(pointer) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, " Expected NULL")
#define TEST_ASSERT_NOT_NULL(pointer) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, " Expected Non-NULL") #define TEST_ASSERT_NOT_NULL(pointer) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, " Expected Non-NULL")
//Integers (of all sizes) /* Integers (of all sizes) */
#define TEST_ASSERT_EQUAL_INT(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL) #define TEST_ASSERT_EQUAL_INT(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_INT8(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, NULL) #define TEST_ASSERT_EQUAL_INT8(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_INT16(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, NULL) #define TEST_ASSERT_EQUAL_INT16(expected, actual) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, NULL)
@ -110,7 +110,7 @@ void tearDown(void);
#define TEST_ASSERT_BIT_HIGH(bit, actual) UNITY_TEST_ASSERT_BITS(((_UU32)1 << (bit)), (_UU32)(-1), (actual), __LINE__, NULL) #define TEST_ASSERT_BIT_HIGH(bit, actual) UNITY_TEST_ASSERT_BITS(((_UU32)1 << (bit)), (_UU32)(-1), (actual), __LINE__, NULL)
#define TEST_ASSERT_BIT_LOW(bit, actual) UNITY_TEST_ASSERT_BITS(((_UU32)1 << (bit)), (_UU32)(0), (actual), __LINE__, NULL) #define TEST_ASSERT_BIT_LOW(bit, actual) UNITY_TEST_ASSERT_BITS(((_UU32)1 << (bit)), (_UU32)(0), (actual), __LINE__, NULL)
//Integer Ranges (of all sizes) /* Integer Ranges (of all sizes) */
#define TEST_ASSERT_INT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT_WITHIN((delta), (expected), (actual), __LINE__, NULL) #define TEST_ASSERT_INT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_INT8_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT8_WITHIN((delta), (expected), (actual), __LINE__, NULL) #define TEST_ASSERT_INT8_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT8_WITHIN((delta), (expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_INT16_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT16_WITHIN((delta), (expected), (actual), __LINE__, NULL) #define TEST_ASSERT_INT16_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_INT16_WITHIN((delta), (expected), (actual), __LINE__, NULL)
@ -127,13 +127,13 @@ void tearDown(void);
#define TEST_ASSERT_HEX32_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, NULL) #define TEST_ASSERT_HEX32_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_HEX64_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX64_WITHIN((delta), (expected), (actual), __LINE__, NULL) #define TEST_ASSERT_HEX64_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_HEX64_WITHIN((delta), (expected), (actual), __LINE__, NULL)
//Structs and Strings /* Structs and Strings */
#define TEST_ASSERT_EQUAL_PTR(expected, actual) UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, NULL) #define TEST_ASSERT_EQUAL_PTR(expected, actual) UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_STRING(expected, actual) UNITY_TEST_ASSERT_EQUAL_STRING((expected), (actual), __LINE__, NULL) #define TEST_ASSERT_EQUAL_STRING(expected, actual) UNITY_TEST_ASSERT_EQUAL_STRING((expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len) UNITY_TEST_ASSERT_EQUAL_STRING_LEN((expected), (actual), (len), __LINE__, NULL) #define TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len) UNITY_TEST_ASSERT_EQUAL_STRING_LEN((expected), (actual), (len), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_MEMORY(expected, actual, len) UNITY_TEST_ASSERT_EQUAL_MEMORY((expected), (actual), (len), __LINE__, NULL) #define TEST_ASSERT_EQUAL_MEMORY(expected, actual, len) UNITY_TEST_ASSERT_EQUAL_MEMORY((expected), (actual), (len), __LINE__, NULL)
//Arrays /* Arrays */
#define TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL) #define TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY((expected), (actual), (num_elements), __LINE__, NULL) #define TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY((expected), (actual), (num_elements), __LINE__, NULL) #define TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
@ -153,7 +153,7 @@ void tearDown(void);
#define TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY((expected), (actual), (num_elements), __LINE__, NULL) #define TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((expected), (actual), (len), (num_elements), __LINE__, NULL) #define TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((expected), (actual), (len), (num_elements), __LINE__, NULL)
//Floating Point (If Enabled) /* Floating Point (If Enabled) */
#define TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, NULL) #define TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_FLOAT(expected, actual) UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, NULL) #define TEST_ASSERT_EQUAL_FLOAT(expected, actual) UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL) #define TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
@ -166,7 +166,7 @@ void tearDown(void);
#define TEST_ASSERT_FLOAT_IS_NOT_NAN(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN((actual), __LINE__, NULL) #define TEST_ASSERT_FLOAT_IS_NOT_NAN(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN((actual), __LINE__, NULL)
#define TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE((actual), __LINE__, NULL) #define TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual) UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE((actual), __LINE__, NULL)
//Double (If Enabled) /* Double (If Enabled) */
#define TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, NULL) #define TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual) UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_DOUBLE(expected, actual) UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, NULL) #define TEST_ASSERT_EQUAL_DOUBLE(expected, actual) UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, NULL)
#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), __LINE__, NULL) #define TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), __LINE__, NULL)
@ -179,11 +179,11 @@ void tearDown(void);
#define TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN((actual), __LINE__, NULL) #define TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN((actual), __LINE__, NULL)
#define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE((actual), __LINE__, NULL) #define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE((actual), __LINE__, NULL)
//------------------------------------------------------- /*-------------------------------------------------------
// Test Asserts (with additional messages) * Test Asserts (with additional messages)
//------------------------------------------------------- *-------------------------------------------------------*/
//Boolean /* Boolean */
#define TEST_ASSERT_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, (message)) #define TEST_ASSERT_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, (message))
#define TEST_ASSERT_TRUE_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, (message)) #define TEST_ASSERT_TRUE_MESSAGE(condition, message) UNITY_TEST_ASSERT( (condition), __LINE__, (message))
#define TEST_ASSERT_UNLESS_MESSAGE(condition, message) UNITY_TEST_ASSERT( !(condition), __LINE__, (message)) #define TEST_ASSERT_UNLESS_MESSAGE(condition, message) UNITY_TEST_ASSERT( !(condition), __LINE__, (message))
@ -191,7 +191,7 @@ void tearDown(void);
#define TEST_ASSERT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, (message)) #define TEST_ASSERT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NULL( (pointer), __LINE__, (message))
#define TEST_ASSERT_NOT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, (message)) #define TEST_ASSERT_NOT_NULL_MESSAGE(pointer, message) UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, (message))
//Integers (of all sizes) /* Integers (of all sizes) */
#define TEST_ASSERT_EQUAL_INT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, (message)) #define TEST_ASSERT_EQUAL_INT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, (message))
#define TEST_ASSERT_EQUAL_INT8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, (message)) #define TEST_ASSERT_EQUAL_INT8_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, (message))
#define TEST_ASSERT_EQUAL_INT16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, (message)) #define TEST_ASSERT_EQUAL_INT16_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, (message))
@ -215,7 +215,7 @@ void tearDown(void);
#define TEST_ASSERT_BIT_HIGH_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((_UU32)1 << (bit)), (_UU32)(-1), (actual), __LINE__, (message)) #define TEST_ASSERT_BIT_HIGH_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((_UU32)1 << (bit)), (_UU32)(-1), (actual), __LINE__, (message))
#define TEST_ASSERT_BIT_LOW_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((_UU32)1 << (bit)), (_UU32)(0), (actual), __LINE__, (message)) #define TEST_ASSERT_BIT_LOW_MESSAGE(bit, actual, message) UNITY_TEST_ASSERT_BITS(((_UU32)1 << (bit)), (_UU32)(0), (actual), __LINE__, (message))
//Integer Ranges (of all sizes) /* Integer Ranges (of all sizes) */
#define TEST_ASSERT_INT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT_WITHIN((delta), (expected), (actual), __LINE__, (message)) #define TEST_ASSERT_INT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT_WITHIN((delta), (expected), (actual), __LINE__, (message))
#define TEST_ASSERT_INT8_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT8_WITHIN((delta), (expected), (actual), __LINE__, (message)) #define TEST_ASSERT_INT8_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT8_WITHIN((delta), (expected), (actual), __LINE__, (message))
#define TEST_ASSERT_INT16_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT16_WITHIN((delta), (expected), (actual), __LINE__, (message)) #define TEST_ASSERT_INT16_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_INT16_WITHIN((delta), (expected), (actual), __LINE__, (message))
@ -232,13 +232,13 @@ void tearDown(void);
#define TEST_ASSERT_HEX32_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, (message)) #define TEST_ASSERT_HEX32_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, (message))
#define TEST_ASSERT_HEX64_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX64_WITHIN((delta), (expected), (actual), __LINE__, (message)) #define TEST_ASSERT_HEX64_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_HEX64_WITHIN((delta), (expected), (actual), __LINE__, (message))
//Structs and Strings /* Structs and Strings */
#define TEST_ASSERT_EQUAL_PTR_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, (message)) #define TEST_ASSERT_EQUAL_PTR_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, (message))
#define TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_STRING((expected), (actual), __LINE__, (message)) #define TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_STRING((expected), (actual), __LINE__, (message))
#define TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message) UNITY_TEST_ASSERT_EQUAL_STRING_LEN((expected), (actual), (len), __LINE__, (message)) #define TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message) UNITY_TEST_ASSERT_EQUAL_STRING_LEN((expected), (actual), (len), __LINE__, (message))
#define TEST_ASSERT_EQUAL_MEMORY_MESSAGE(expected, actual, len, message) UNITY_TEST_ASSERT_EQUAL_MEMORY((expected), (actual), (len), __LINE__, (message)) #define TEST_ASSERT_EQUAL_MEMORY_MESSAGE(expected, actual, len, message) UNITY_TEST_ASSERT_EQUAL_MEMORY((expected), (actual), (len), __LINE__, (message))
//Arrays /* Arrays */
#define TEST_ASSERT_EQUAL_INT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY((expected), (actual), (num_elements), __LINE__, (message)) #define TEST_ASSERT_EQUAL_INT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
#define TEST_ASSERT_EQUAL_INT8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY((expected), (actual), (num_elements), __LINE__, (message)) #define TEST_ASSERT_EQUAL_INT8_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
#define TEST_ASSERT_EQUAL_INT16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY((expected), (actual), (num_elements), __LINE__, (message)) #define TEST_ASSERT_EQUAL_INT16_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
@ -258,7 +258,7 @@ void tearDown(void);
#define TEST_ASSERT_EQUAL_STRING_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY((expected), (actual), (num_elements), __LINE__, (message)) #define TEST_ASSERT_EQUAL_STRING_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
#define TEST_ASSERT_EQUAL_MEMORY_ARRAY_MESSAGE(expected, actual, len, num_elements, message) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((expected), (actual), (len), (num_elements), __LINE__, (message)) #define TEST_ASSERT_EQUAL_MEMORY_ARRAY_MESSAGE(expected, actual, len, num_elements, message) UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((expected), (actual), (len), (num_elements), __LINE__, (message))
//Floating Point (If Enabled) /* Floating Point (If Enabled) */
#define TEST_ASSERT_FLOAT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, (message)) #define TEST_ASSERT_FLOAT_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, (message))
#define TEST_ASSERT_EQUAL_FLOAT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, (message)) #define TEST_ASSERT_EQUAL_FLOAT_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, (message))
#define TEST_ASSERT_EQUAL_FLOAT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), __LINE__, (message)) #define TEST_ASSERT_EQUAL_FLOAT_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
@ -271,7 +271,7 @@ void tearDown(void);
#define TEST_ASSERT_FLOAT_IS_NOT_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN((actual), __LINE__, (message)) #define TEST_ASSERT_FLOAT_IS_NOT_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN((actual), __LINE__, (message))
#define TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE((actual), __LINE__, (message)) #define TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE((actual), __LINE__, (message))
//Double (If Enabled) /* Double (If Enabled) */
#define TEST_ASSERT_DOUBLE_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, (message)) #define TEST_ASSERT_DOUBLE_WITHIN_MESSAGE(delta, expected, actual, message) UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, (message))
#define TEST_ASSERT_EQUAL_DOUBLE_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, (message)) #define TEST_ASSERT_EQUAL_DOUBLE_MESSAGE(expected, actual, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, (message))
#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), __LINE__, (message)) #define TEST_ASSERT_EQUAL_DOUBLE_ARRAY_MESSAGE(expected, actual, num_elements, message) UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), __LINE__, (message))
@ -284,7 +284,7 @@ void tearDown(void);
#define TEST_ASSERT_DOUBLE_IS_NOT_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN((actual), __LINE__, (message)) #define TEST_ASSERT_DOUBLE_IS_NOT_NAN_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN((actual), __LINE__, (message))
#define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE((actual), __LINE__, (message)) #define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE_MESSAGE(actual, message) UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE((actual), __LINE__, (message))
//end of UNITY_FRAMEWORK_H /* end of UNITY_FRAMEWORK_H */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -13,10 +13,10 @@
#include <setjmp.h> #include <setjmp.h>
// Unity Attempts to Auto-Detect Integer Types /* Unity Attempts to Auto-Detect Integer Types
// Attempt 1: UINT_MAX, ULONG_MAX, etc in <stdint.h> * Attempt 1: UINT_MAX, ULONG_MAX, etc in <stdint.h>
// Attempt 2: UINT_MAX, ULONG_MAX, etc in <limits.h> * Attempt 2: UINT_MAX, ULONG_MAX, etc in <limits.h>
// Attempt 3: Deduced from sizeof() macros * Attempt 3: Deduced from sizeof() macros */
#ifndef UNITY_EXCLUDE_STDINT_H #ifndef UNITY_EXCLUDE_STDINT_H
#include <stdint.h> #include <stdint.h>
#endif #endif
@ -33,7 +33,7 @@
#define ULONG_MAX (sizeof(unsigned long) * 256 - 1) #define ULONG_MAX (sizeof(unsigned long) * 256 - 1)
#endif #endif
#ifndef UINTPTR_MAX #ifndef UINTPTR_MAX
//apparently this is not a constant expression: (sizeof(unsigned int *) * 256 - 1) so we have to just let this fall through /* apparently this is not a constant expression: (sizeof(unsigned int *) * 256 - 1) so we have to just let this fall through */
#endif #endif
#endif #endif
@ -41,14 +41,14 @@
#include <math.h> #include <math.h>
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// Guess Widths If Not Specified * Guess Widths If Not Specified
//------------------------------------------------------- *-------------------------------------------------------*/
// Determine the size of an int, if not already specificied. /* Determine the size of an int, if not already specificied.
// We cannot use sizeof(int), because it is not yet defined * We cannot use sizeof(int), because it is not yet defined
// at this stage in the trnslation of the C program. * at this stage in the trnslation of the C program.
// Therefore, infer it from UINT_MAX if possible. * Therefore, infer it from UINT_MAX if possible. */
#ifndef UNITY_INT_WIDTH #ifndef UNITY_INT_WIDTH
#ifdef UINT_MAX #ifdef UINT_MAX
#if (UINT_MAX == 0xFFFF) #if (UINT_MAX == 0xFFFF)
@ -64,9 +64,9 @@
#define UNITY_INT_WIDTH (32) #define UNITY_INT_WIDTH (32)
#endif #endif
// Determine the size of a long, if not already specified, /* Determine the size of a long, if not already specified,
// by following the process used above to define * by following the process used above to define
// UNITY_INT_WIDTH. * UNITY_INT_WIDTH. */
#ifndef UNITY_LONG_WIDTH #ifndef UNITY_LONG_WIDTH
#ifdef ULONG_MAX #ifdef ULONG_MAX
#if (ULONG_MAX == 0xFFFF) #if (ULONG_MAX == 0xFFFF)
@ -82,9 +82,9 @@
#define UNITY_LONG_WIDTH (32) #define UNITY_LONG_WIDTH (32)
#endif #endif
// Determine the size of a pointer, if not already specified, /* Determine the size of a pointer, if not already specified,
// by following the process used above to define * by following the process used above to define
// UNITY_INT_WIDTH. * UNITY_INT_WIDTH. */
#ifndef UNITY_POINTER_WIDTH #ifndef UNITY_POINTER_WIDTH
#ifdef UINTPTR_MAX #ifdef UINTPTR_MAX
#if (UINTPTR_MAX+0 <= 0xFFFF) #if (UINTPTR_MAX+0 <= 0xFFFF)
@ -111,9 +111,9 @@
#define UNITY_POINTER_WIDTH UNITY_LONG_WIDTH #define UNITY_POINTER_WIDTH UNITY_LONG_WIDTH
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// Int Support (Define types based on detected sizes) * Int Support (Define types based on detected sizes)
//------------------------------------------------------- *-------------------------------------------------------*/
#if (UNITY_INT_WIDTH == 32) #if (UNITY_INT_WIDTH == 32)
typedef unsigned char _UU8; typedef unsigned char _UU8;
@ -133,9 +133,9 @@
#error Invalid UNITY_INT_WIDTH specified! (16 or 32 are supported) #error Invalid UNITY_INT_WIDTH specified! (16 or 32 are supported)
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// 64-bit Support * 64-bit Support
//------------------------------------------------------- *-------------------------------------------------------*/
#ifndef UNITY_SUPPORT_64 #ifndef UNITY_SUPPORT_64
#if UNITY_LONG_WIDTH > 32 #if UNITY_LONG_WIDTH > 32
@ -150,13 +150,13 @@
#ifndef UNITY_SUPPORT_64 #ifndef UNITY_SUPPORT_64
//No 64-bit Support /* No 64-bit Support */
typedef _UU32 _U_UINT; typedef _UU32 _U_UINT;
typedef _US32 _U_SINT; typedef _US32 _U_SINT;
#else #else
//64-bit Support /* 64-bit Support */
#if (UNITY_LONG_WIDTH == 32) #if (UNITY_LONG_WIDTH == 32)
typedef unsigned long long _UU64; typedef unsigned long long _UU64;
typedef signed long long _US64; typedef signed long long _US64;
@ -171,9 +171,9 @@ typedef _US64 _U_SINT;
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// Pointer Support * Pointer Support
//------------------------------------------------------- *-------------------------------------------------------*/
#if (UNITY_POINTER_WIDTH == 32) #if (UNITY_POINTER_WIDTH == 32)
typedef _UU32 _UP; typedef _UU32 _UP;
@ -194,16 +194,16 @@ typedef _US64 _U_SINT;
#ifndef UNITY_INTERNAL_PTR #ifndef UNITY_INTERNAL_PTR
#define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const void* #define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const void*
//#define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const _UU8* /* #define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const _UU8* */
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// Float Support * Float Support
//------------------------------------------------------- *-------------------------------------------------------*/
#ifdef UNITY_EXCLUDE_FLOAT #ifdef UNITY_EXCLUDE_FLOAT
//No Floating Point Support /* No Floating Point Support */
#undef UNITY_INCLUDE_FLOAT #undef UNITY_INCLUDE_FLOAT
#undef UNITY_FLOAT_PRECISION #undef UNITY_FLOAT_PRECISION
#undef UNITY_FLOAT_TYPE #undef UNITY_FLOAT_TYPE
@ -215,7 +215,7 @@ typedef _US64 _U_SINT;
#define UNITY_INCLUDE_FLOAT #define UNITY_INCLUDE_FLOAT
#endif #endif
//Floating Point Support /* Floating Point Support */
#ifndef UNITY_FLOAT_PRECISION #ifndef UNITY_FLOAT_PRECISION
#define UNITY_FLOAT_PRECISION (0.00001f) #define UNITY_FLOAT_PRECISION (0.00001f)
#endif #endif
@ -243,11 +243,11 @@ typedef UNITY_FLOAT_TYPE _UF;
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// Double Float Support * Double Float Support
//------------------------------------------------------- *-------------------------------------------------------*/
//unlike FLOAT, we DON'T include by default /* unlike FLOAT, we DON'T include by default */
#ifndef UNITY_EXCLUDE_DOUBLE #ifndef UNITY_EXCLUDE_DOUBLE
#ifndef UNITY_INCLUDE_DOUBLE #ifndef UNITY_INCLUDE_DOUBLE
#define UNITY_EXCLUDE_DOUBLE #define UNITY_EXCLUDE_DOUBLE
@ -256,7 +256,7 @@ typedef UNITY_FLOAT_TYPE _UF;
#ifdef UNITY_EXCLUDE_DOUBLE #ifdef UNITY_EXCLUDE_DOUBLE
//No Floating Point Support /* No Floating Point Support */
#undef UNITY_DOUBLE_PRECISION #undef UNITY_DOUBLE_PRECISION
#undef UNITY_DOUBLE_TYPE #undef UNITY_DOUBLE_TYPE
#undef UNITY_DOUBLE_VERBOSE #undef UNITY_DOUBLE_VERBOSE
@ -267,7 +267,7 @@ typedef UNITY_FLOAT_TYPE _UF;
#else #else
//Double Floating Point Support /* Double Floating Point Support */
#ifndef UNITY_DOUBLE_PRECISION #ifndef UNITY_DOUBLE_PRECISION
#define UNITY_DOUBLE_PRECISION (1e-12f) #define UNITY_DOUBLE_PRECISION (1e-12f)
#endif #endif
@ -284,26 +284,26 @@ typedef UNITY_DOUBLE_TYPE _UD;
#endif #endif
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// Output Method: stdout (DEFAULT) * Output Method: stdout (DEFAULT)
//------------------------------------------------------- *-------------------------------------------------------*/
#ifndef UNITY_OUTPUT_CHAR #ifndef UNITY_OUTPUT_CHAR
//Default to using putchar, which is defined in stdio.h /* Default to using putchar, which is defined in stdio.h */
#include <stdio.h> #include <stdio.h>
#define UNITY_OUTPUT_CHAR(a) (void)putchar(a) #define UNITY_OUTPUT_CHAR(a) (void)putchar(a)
#else #else
//If defined as something else, make sure we declare it here so it's ready for use /* If defined as something else, make sure we declare it here so it's ready for use */
#ifndef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION #ifndef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION
extern void UNITY_OUTPUT_CHAR(int); extern void UNITY_OUTPUT_CHAR(int);
#endif #endif
#endif #endif
#ifndef UNITY_OUTPUT_FLUSH #ifndef UNITY_OUTPUT_FLUSH
//Default to using putchar, which is defined in stdio.h /* Default to using putchar, which is defined in stdio.h */
#include <stdio.h> #include <stdio.h>
#define UNITY_OUTPUT_FLUSH() (void)fflush(stdout) #define UNITY_OUTPUT_FLUSH() (void)fflush(stdout)
#else #else
//If defined as something else, make sure we declare it here so it's ready for use /* If defined as something else, make sure we declare it here so it's ready for use */
#ifndef UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION #ifndef UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION
extern void UNITY_OUTPUT_FLUSH(void); extern void UNITY_OUTPUT_FLUSH(void);
#endif #endif
@ -321,9 +321,9 @@ extern void UNITY_OUTPUT_FLUSH(void);
#define UNITY_OUTPUT_COMPLETE() #define UNITY_OUTPUT_COMPLETE()
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// Footprint * Footprint
//------------------------------------------------------- *-------------------------------------------------------*/
#ifndef UNITY_LINE_TYPE #ifndef UNITY_LINE_TYPE
#define UNITY_LINE_TYPE _U_UINT #define UNITY_LINE_TYPE _U_UINT
@ -333,11 +333,11 @@ extern void UNITY_OUTPUT_FLUSH(void);
#define UNITY_COUNTER_TYPE _U_UINT #define UNITY_COUNTER_TYPE _U_UINT
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// Language Features Available * Language Features Available
//------------------------------------------------------- *-------------------------------------------------------*/
#if !defined(UNITY_WEAK_ATTRIBUTE) && !defined(UNITY_WEAK_PRAGMA) #if !defined(UNITY_WEAK_ATTRIBUTE) && !defined(UNITY_WEAK_PRAGMA)
# ifdef __GNUC__ // includes clang # ifdef __GNUC__ /* includes clang */
# if !(defined(__WIN32__) && defined(__clang__)) # if !(defined(__WIN32__) && defined(__clang__))
# define UNITY_WEAK_ATTRIBUTE __attribute__((weak)) # define UNITY_WEAK_ATTRIBUTE __attribute__((weak))
# endif # endif
@ -350,9 +350,9 @@ extern void UNITY_OUTPUT_FLUSH(void);
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// Internal Structs Needed * Internal Structs Needed
//------------------------------------------------------- *-------------------------------------------------------*/
typedef void (*UnityTestFunction)(void); typedef void (*UnityTestFunction)(void);
@ -433,18 +433,18 @@ struct _Unity
extern struct _Unity Unity; extern struct _Unity Unity;
//------------------------------------------------------- /*-------------------------------------------------------
// Test Suite Management * Test Suite Management
//------------------------------------------------------- *-------------------------------------------------------*/
void UnityBegin(const char* filename); void UnityBegin(const char* filename);
int UnityEnd(void); int UnityEnd(void);
void UnityConcludeTest(void); void UnityConcludeTest(void);
void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum); void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum);
//------------------------------------------------------- /*-------------------------------------------------------
// Details Support * Details Support
//------------------------------------------------------- *-------------------------------------------------------*/
#ifdef UNITY_EXCLUDE_DETAILS #ifdef UNITY_EXCLUDE_DETAILS
#define UNITY_CLR_DETAILS() #define UNITY_CLR_DETAILS()
@ -464,9 +464,9 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int
#endif #endif
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// Test Output * Test Output
//------------------------------------------------------- *-------------------------------------------------------*/
void UnityPrint(const char* string); void UnityPrint(const char* string);
void UnityPrintMask(const _U_UINT mask, const _U_UINT number); void UnityPrintMask(const _U_UINT mask, const _U_UINT number);
@ -479,13 +479,13 @@ void UnityPrintNumberHex(const _U_UINT number, const char nibbles);
void UnityPrintFloat(const _UF number); void UnityPrintFloat(const _UF number);
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// Test Assertion Fuctions * Test Assertion Fuctions
//------------------------------------------------------- *-------------------------------------------------------
// Use the macros below this section instead of calling * Use the macros below this section instead of calling
// these directly. The macros have a consistent naming * these directly. The macros have a consistent naming
// convention and will pull in file and line information * convention and will pull in file and line information
// for you. * for you. */
void UnityAssertEqualNumber(const _U_SINT expected, void UnityAssertEqualNumber(const _U_SINT expected,
const _U_SINT actual, const _U_SINT actual,
@ -579,23 +579,23 @@ void UnityAssertDoubleSpecial(const _UD actual,
const UNITY_FLOAT_TRAIT_T style); const UNITY_FLOAT_TRAIT_T style);
#endif #endif
//------------------------------------------------------- /*-------------------------------------------------------
// Error Strings We Might Need * Error Strings We Might Need
//------------------------------------------------------- *-------------------------------------------------------*/
extern const char UnityStrErrFloat[]; extern const char UnityStrErrFloat[];
extern const char UnityStrErrDouble[]; extern const char UnityStrErrDouble[];
extern const char UnityStrErr64[]; extern const char UnityStrErr64[];
//------------------------------------------------------- /*-------------------------------------------------------
// Test Running Macros * Test Running Macros
//------------------------------------------------------- *-------------------------------------------------------*/
#define TEST_PROTECT() (setjmp(Unity.AbortFrame) == 0) #define TEST_PROTECT() (setjmp(Unity.AbortFrame) == 0)
#define TEST_ABORT() {longjmp(Unity.AbortFrame, 1);} #define TEST_ABORT() {longjmp(Unity.AbortFrame, 1);}
//This tricky series of macros gives us an optional line argument to treat it as RUN_TEST(func, num=__LINE__) /* This tricky series of macros gives us an optional line argument to treat it as RUN_TEST(func, num=__LINE__) */
#ifndef RUN_TEST #ifndef RUN_TEST
#ifdef __STDC_VERSION__ #ifdef __STDC_VERSION__
#if __STDC_VERSION__ >= 199901L #if __STDC_VERSION__ >= 199901L
@ -608,7 +608,7 @@ extern const char UnityStrErr64[];
#endif #endif
#endif #endif
//If we can't do the tricky version, we'll just have to require them to always include the line number /* If we can't do the tricky version, we'll just have to require them to always include the line number */
#ifndef RUN_TEST #ifndef RUN_TEST
#ifdef CMOCK #ifdef CMOCK
#define RUN_TEST(func, num) UnityDefaultTestRun(func, #func, num) #define RUN_TEST(func, num) UnityDefaultTestRun(func, #func, num)
@ -634,16 +634,16 @@ extern const char UnityStrErr64[];
#define UNITY_UNUSED(x) (void)(sizeof(x)) #define UNITY_UNUSED(x) (void)(sizeof(x))
//------------------------------------------------------- /*-------------------------------------------------------
// Basic Fail and Ignore * Basic Fail and Ignore
//------------------------------------------------------- *-------------------------------------------------------*/
#define UNITY_TEST_FAIL(line, message) UnityFail( (message), (UNITY_LINE_TYPE)(line)) #define UNITY_TEST_FAIL(line, message) UnityFail( (message), (UNITY_LINE_TYPE)(line))
#define UNITY_TEST_IGNORE(line, message) UnityIgnore( (message), (UNITY_LINE_TYPE)(line)) #define UNITY_TEST_IGNORE(line, message) UnityIgnore( (message), (UNITY_LINE_TYPE)(line))
//------------------------------------------------------- /*-------------------------------------------------------
// Test Asserts * Test Asserts
//------------------------------------------------------- *-------------------------------------------------------*/
#define UNITY_TEST_ASSERT(condition, line, message) if (condition) {} else {UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), (message));} #define UNITY_TEST_ASSERT(condition, line, message) if (condition) {} else {UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), (message));}
#define UNITY_TEST_ASSERT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) == NULL), (UNITY_LINE_TYPE)(line), (message)) #define UNITY_TEST_ASSERT_NULL(pointer, line, message) UNITY_TEST_ASSERT(((pointer) == NULL), (UNITY_LINE_TYPE)(line), (message))
@ -768,5 +768,5 @@ extern const char UnityStrErr64[];
#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_DET) #define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) UnityAssertDoubleSpecial((_UD)(actual), (message), (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_DET)
#endif #endif
//End of UNITY_INTERNALS_H /* End of UNITY_INTERNALS_H */
#endif #endif

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -21,7 +21,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include <setjmp.h> #include <setjmp.h>
#include <stdio.h> #include <stdio.h>
@ -30,7 +30,7 @@
#include "stanky.h" #include "stanky.h"
#include <setjmp.h> #include <setjmp.h>
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
@ -39,7 +39,7 @@ extern void test_TheThirdThingToTest(void);
extern void test_TheFourthThingToTest(void); extern void test_TheFourthThingToTest(void);
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -48,7 +48,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
UnityBegin("testdata/testsample.c"); UnityBegin("testdata/testsample.c");

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -18,7 +18,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include <setjmp.h> #include <setjmp.h>
#include <stdio.h> #include <stdio.h>
@ -26,7 +26,7 @@
#include "stanky.h" #include "stanky.h"
#include <setjmp.h> #include <setjmp.h>
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
@ -35,7 +35,7 @@ extern void test_TheThirdThingToTest(void);
extern void test_TheFourthThingToTest(void); extern void test_TheFourthThingToTest(void);
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -44,7 +44,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
UnityBegin("testdata/testsample.c"); UnityBegin("testdata/testsample.c");

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -18,13 +18,13 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include <setjmp.h> #include <setjmp.h>
#include <stdio.h> #include <stdio.h>
#include "testsample_head1.h" #include "testsample_head1.h"
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
@ -33,7 +33,7 @@ extern void test_TheThirdThingToTest(void);
extern void test_TheFourthThingToTest(void); extern void test_TheFourthThingToTest(void);
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -42,7 +42,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
UnityBegin("testdata/testsample.c"); UnityBegin("testdata/testsample.c");

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -25,7 +25,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include "cmock.h" #include "cmock.h"
#include <setjmp.h> #include <setjmp.h>
@ -35,14 +35,14 @@
#include <setjmp.h> #include <setjmp.h>
#include "Mockstanky.h" #include "Mockstanky.h"
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
extern void test_TheSecondThingToTest(void); extern void test_TheSecondThingToTest(void);
//=======Mock Management===== /*=======Mock Management=====*/
static void CMock_Init(void) static void CMock_Init(void)
{ {
Mockstanky_Init(); Mockstanky_Init();
@ -56,7 +56,7 @@ static void CMock_Destroy(void)
Mockstanky_Destroy(); Mockstanky_Destroy();
} }
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -68,7 +68,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
UnityBegin("testdata/mocksample.c"); UnityBegin("testdata/mocksample.c");

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -22,7 +22,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include "cmock.h" #include "cmock.h"
#include <setjmp.h> #include <setjmp.h>
@ -31,14 +31,14 @@
#include <setjmp.h> #include <setjmp.h>
#include "Mockstanky.h" #include "Mockstanky.h"
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
extern void test_TheSecondThingToTest(void); extern void test_TheSecondThingToTest(void);
//=======Mock Management===== /*=======Mock Management=====*/
static void CMock_Init(void) static void CMock_Init(void)
{ {
Mockstanky_Init(); Mockstanky_Init();
@ -52,7 +52,7 @@ static void CMock_Destroy(void)
Mockstanky_Destroy(); Mockstanky_Destroy();
} }
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -64,7 +64,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
UnityBegin("testdata/mocksample.c"); UnityBegin("testdata/mocksample.c");

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -22,7 +22,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include "cmock.h" #include "cmock.h"
#include <setjmp.h> #include <setjmp.h>
@ -30,14 +30,14 @@
#include "testsample_mock_head1.h" #include "testsample_mock_head1.h"
#include "Mockstanky.h" #include "Mockstanky.h"
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
extern void test_TheSecondThingToTest(void); extern void test_TheSecondThingToTest(void);
//=======Mock Management===== /*=======Mock Management=====*/
static void CMock_Init(void) static void CMock_Init(void)
{ {
Mockstanky_Init(); Mockstanky_Init();
@ -51,7 +51,7 @@ static void CMock_Destroy(void)
Mockstanky_Destroy(); Mockstanky_Destroy();
} }
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -63,7 +63,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
UnityBegin("testdata/mocksample.c"); UnityBegin("testdata/mocksample.c");

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -25,7 +25,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include "cmock.h" #include "cmock.h"
#include <setjmp.h> #include <setjmp.h>
@ -41,14 +41,14 @@ int GlobalExpectCount;
int GlobalVerifyOrder; int GlobalVerifyOrder;
char* GlobalOrderError; char* GlobalOrderError;
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
extern void test_TheSecondThingToTest(void); extern void test_TheSecondThingToTest(void);
//=======Mock Management===== /*=======Mock Management=====*/
static void CMock_Init(void) static void CMock_Init(void)
{ {
GlobalExpectCount = 0; GlobalExpectCount = 0;
@ -65,7 +65,7 @@ static void CMock_Destroy(void)
Mockstanky_Destroy(); Mockstanky_Destroy();
} }
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -77,7 +77,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
UnityBegin("testdata/mocksample.c"); UnityBegin("testdata/mocksample.c");

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -22,7 +22,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include "cmock.h" #include "cmock.h"
#include <setjmp.h> #include <setjmp.h>
@ -31,14 +31,14 @@
#include <setjmp.h> #include <setjmp.h>
#include "Mockstanky.h" #include "Mockstanky.h"
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
extern void test_TheSecondThingToTest(void); extern void test_TheSecondThingToTest(void);
//=======Mock Management===== /*=======Mock Management=====*/
static void CMock_Init(void) static void CMock_Init(void)
{ {
Mockstanky_Init(); Mockstanky_Init();
@ -52,19 +52,19 @@ static void CMock_Destroy(void)
Mockstanky_Destroy(); Mockstanky_Destroy();
} }
//=======Suite Setup===== /*=======Suite Setup=====*/
static int suite_setup(void) static int suite_setup(void)
{ {
a_custom_setup(); a_custom_setup();
} }
//=======Suite Teardown===== /*=======Suite Teardown=====*/
static int suite_teardown(int num_failures) static int suite_teardown(int num_failures)
{ {
a_custom_teardown(); a_custom_teardown();
} }
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -76,7 +76,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
suite_setup(); suite_setup();

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST_NO_ARGS #define RUN_TEST_NO_ARGS
#define RUN_TEST(TestFunc, TestLineNum, ...) \ #define RUN_TEST(TestFunc, TestLineNum, ...) \
{ \ { \
@ -23,7 +23,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include "cmock.h" #include "cmock.h"
#include <setjmp.h> #include <setjmp.h>
@ -32,14 +32,14 @@
#include <setjmp.h> #include <setjmp.h>
#include "Mockstanky.h" #include "Mockstanky.h"
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
extern void test_TheSecondThingToTest(void); extern void test_TheSecondThingToTest(void);
//=======Mock Management===== /*=======Mock Management=====*/
static void CMock_Init(void) static void CMock_Init(void)
{ {
Mockstanky_Init(); Mockstanky_Init();
@ -53,7 +53,7 @@ static void CMock_Destroy(void)
Mockstanky_Destroy(); Mockstanky_Destroy();
} }
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -65,7 +65,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
UnityBegin("testdata/mocksample.c"); UnityBegin("testdata/mocksample.c");

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -25,7 +25,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include "cmock.h" #include "cmock.h"
#include <setjmp.h> #include <setjmp.h>
@ -41,14 +41,14 @@ int GlobalExpectCount;
int GlobalVerifyOrder; int GlobalVerifyOrder;
char* GlobalOrderError; char* GlobalOrderError;
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
extern void test_TheSecondThingToTest(void); extern void test_TheSecondThingToTest(void);
//=======Mock Management===== /*=======Mock Management=====*/
static void CMock_Init(void) static void CMock_Init(void)
{ {
GlobalExpectCount = 0; GlobalExpectCount = 0;
@ -65,7 +65,7 @@ static void CMock_Destroy(void)
Mockstanky_Destroy(); Mockstanky_Destroy();
} }
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -77,7 +77,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
UnityBegin("testdata/mocksample.c"); UnityBegin("testdata/mocksample.c");

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -22,7 +22,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include "cmock.h" #include "cmock.h"
#include <setjmp.h> #include <setjmp.h>
@ -31,14 +31,14 @@
#include <setjmp.h> #include <setjmp.h>
#include "Mockstanky.h" #include "Mockstanky.h"
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
extern void test_TheSecondThingToTest(void); extern void test_TheSecondThingToTest(void);
//=======Mock Management===== /*=======Mock Management=====*/
static void CMock_Init(void) static void CMock_Init(void)
{ {
Mockstanky_Init(); Mockstanky_Init();
@ -52,19 +52,19 @@ static void CMock_Destroy(void)
Mockstanky_Destroy(); Mockstanky_Destroy();
} }
//=======Suite Setup===== /*=======Suite Setup=====*/
static int suite_setup(void) static int suite_setup(void)
{ {
a_custom_setup(); a_custom_setup();
} }
//=======Suite Teardown===== /*=======Suite Teardown=====*/
static int suite_teardown(int num_failures) static int suite_teardown(int num_failures)
{ {
a_custom_teardown(); a_custom_teardown();
} }
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -76,7 +76,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
suite_setup(); suite_setup();

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -25,7 +25,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include "cmock.h" #include "cmock.h"
#include <setjmp.h> #include <setjmp.h>
@ -38,14 +38,14 @@
#include <setjmp.h> #include <setjmp.h>
#include "Mockstanky.h" #include "Mockstanky.h"
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
extern void test_TheSecondThingToTest(void); extern void test_TheSecondThingToTest(void);
//=======Mock Management===== /*=======Mock Management=====*/
static void CMock_Init(void) static void CMock_Init(void)
{ {
Mockstanky_Init(); Mockstanky_Init();
@ -59,13 +59,13 @@ static void CMock_Destroy(void)
Mockstanky_Destroy(); Mockstanky_Destroy();
} }
//=======Suite Setup===== /*=======Suite Setup=====*/
static int suite_setup(void) static int suite_setup(void)
{ {
a_yaml_setup(); a_yaml_setup();
} }
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -77,7 +77,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
suite_setup(); suite_setup();

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -21,7 +21,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include <setjmp.h> #include <setjmp.h>
#include <stdio.h> #include <stdio.h>
@ -36,7 +36,7 @@ int GlobalExpectCount;
int GlobalVerifyOrder; int GlobalVerifyOrder;
char* GlobalOrderError; char* GlobalOrderError;
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
@ -45,7 +45,7 @@ extern void test_TheThirdThingToTest(void);
extern void test_TheFourthThingToTest(void); extern void test_TheFourthThingToTest(void);
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -54,7 +54,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
UnityBegin("testdata/testsample.c"); UnityBegin("testdata/testsample.c");

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -18,7 +18,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include <setjmp.h> #include <setjmp.h>
#include <stdio.h> #include <stdio.h>
@ -26,7 +26,7 @@
#include "stanky.h" #include "stanky.h"
#include <setjmp.h> #include <setjmp.h>
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
@ -35,19 +35,19 @@ extern void test_TheThirdThingToTest(void);
extern void test_TheFourthThingToTest(void); extern void test_TheFourthThingToTest(void);
//=======Suite Setup===== /*=======Suite Setup=====*/
static int suite_setup(void) static int suite_setup(void)
{ {
a_custom_setup(); a_custom_setup();
} }
//=======Suite Teardown===== /*=======Suite Teardown=====*/
static int suite_teardown(int num_failures) static int suite_teardown(int num_failures)
{ {
a_custom_teardown(); a_custom_teardown();
} }
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -56,7 +56,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
suite_setup(); suite_setup();

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST_NO_ARGS #define RUN_TEST_NO_ARGS
#define RUN_TEST(TestFunc, TestLineNum, ...) \ #define RUN_TEST(TestFunc, TestLineNum, ...) \
{ \ { \
@ -19,7 +19,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include <setjmp.h> #include <setjmp.h>
#include <stdio.h> #include <stdio.h>
@ -27,7 +27,7 @@
#include "stanky.h" #include "stanky.h"
#include <setjmp.h> #include <setjmp.h>
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
@ -36,7 +36,7 @@ extern void test_TheThirdThingToTest(void);
extern void test_TheFourthThingToTest(void); extern void test_TheFourthThingToTest(void);
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -45,7 +45,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
UnityBegin("testdata/testsample.c"); UnityBegin("testdata/testsample.c");

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -21,7 +21,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include <setjmp.h> #include <setjmp.h>
#include <stdio.h> #include <stdio.h>
@ -36,7 +36,7 @@ int GlobalExpectCount;
int GlobalVerifyOrder; int GlobalVerifyOrder;
char* GlobalOrderError; char* GlobalOrderError;
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
@ -45,7 +45,7 @@ extern void test_TheThirdThingToTest(void);
extern void test_TheFourthThingToTest(void); extern void test_TheFourthThingToTest(void);
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -54,7 +54,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
UnityBegin("testdata/testsample.c"); UnityBegin("testdata/testsample.c");

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -18,7 +18,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include <setjmp.h> #include <setjmp.h>
#include <stdio.h> #include <stdio.h>
@ -26,7 +26,7 @@
#include "stanky.h" #include "stanky.h"
#include <setjmp.h> #include <setjmp.h>
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
@ -35,19 +35,19 @@ extern void test_TheThirdThingToTest(void);
extern void test_TheFourthThingToTest(void); extern void test_TheFourthThingToTest(void);
//=======Suite Setup===== /*=======Suite Setup=====*/
static int suite_setup(void) static int suite_setup(void)
{ {
a_custom_setup(); a_custom_setup();
} }
//=======Suite Teardown===== /*=======Suite Teardown=====*/
static int suite_teardown(int num_failures) static int suite_teardown(int num_failures)
{ {
a_custom_teardown(); a_custom_teardown();
} }
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -56,7 +56,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
suite_setup(); suite_setup();

View File

@ -1,6 +1,6 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */ /* AUTOGENERATED FILE. DO NOT EDIT. */
//=======Test Runner Used To Run Each Test Below===== /*=======Test Runner Used To Run Each Test Below=====*/
#define RUN_TEST(TestFunc, TestLineNum) \ #define RUN_TEST(TestFunc, TestLineNum) \
{ \ { \
Unity.CurrentTestName = #TestFunc; \ Unity.CurrentTestName = #TestFunc; \
@ -21,7 +21,7 @@
UnityConcludeTest(); \ UnityConcludeTest(); \
} }
//=======Automagically Detected Files To Include===== /*=======Automagically Detected Files To Include=====*/
#include "unity.h" #include "unity.h"
#include <setjmp.h> #include <setjmp.h>
#include <stdio.h> #include <stdio.h>
@ -33,7 +33,7 @@
#include "stanky.h" #include "stanky.h"
#include <setjmp.h> #include <setjmp.h>
//=======External Functions This Runner Calls===== /*=======External Functions This Runner Calls=====*/
extern void setUp(void); extern void setUp(void);
extern void tearDown(void); extern void tearDown(void);
extern void test_TheFirstThingToTest(void); extern void test_TheFirstThingToTest(void);
@ -42,13 +42,13 @@ extern void test_TheThirdThingToTest(void);
extern void test_TheFourthThingToTest(void); extern void test_TheFourthThingToTest(void);
//=======Suite Setup===== /*=======Suite Setup=====*/
static int suite_setup(void) static int suite_setup(void)
{ {
a_yaml_setup(); a_yaml_setup();
} }
//=======Test Reset Option===== /*=======Test Reset Option=====*/
void resetTest(void); void resetTest(void);
void resetTest(void) void resetTest(void)
{ {
@ -57,7 +57,7 @@ void resetTest(void)
} }
//=======MAIN===== /*=======MAIN=====*/
int main(void) int main(void)
{ {
suite_setup(); suite_setup();