vendor/unity/src/unity.c in ceedling-0.24.0 vs vendor/unity/src/unity.c in ceedling-0.25.0
- old
+ new
@@ -17,11 +17,11 @@
#define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; longjmp(Unity.AbortFrame, 1); }
/* return prematurely if we are already in failure or ignore state */
#define UNITY_SKIP_EXECUTION { if ((Unity.CurrentTestFailed != 0) || (Unity.CurrentTestIgnored != 0)) {return;} }
-struct _Unity Unity;
+struct UNITY_STORAGE_T Unity;
static const char UnityStrOk[] = "OK";
static const char UnityStrPass[] = "PASS";
static const char UnityStrFail[] = "FAIL";
static const char UnityStrIgnore[] = "IGNORE";
@@ -53,11 +53,11 @@
static const char UnityStrResultsIgnored[] = " Ignored ";
static const char UnityStrDetail1Name[] = UNITY_DETAIL1_NAME " ";
static const char UnityStrDetail2Name[] = " " UNITY_DETAIL2_NAME " ";
/* compiler-generic print formatting masks */
-static const _U_UINT UnitySizeMask[] =
+static const UNITY_UINT UnitySizeMask[] =
{
255u, /* 0xFF */
65535u, /* 0xFFFF */
65535u,
4294967295u, /* 0xFFFFFFFF */
@@ -101,25 +101,25 @@
/* unprintable characters are shown as codes */
else
{
UNITY_OUTPUT_CHAR('\\');
UNITY_OUTPUT_CHAR('x');
- UnityPrintNumberHex((_U_UINT)*pch, 2);
+ UnityPrintNumberHex((UNITY_UINT)*pch, 2);
}
pch++;
}
}
}
-void UnityPrintLen(const char* string, const _UU32 length);
-void UnityPrintLen(const char* string, const _UU32 length)
+void UnityPrintLen(const char* string, const UNITY_UINT32 length);
+void UnityPrintLen(const char* string, const UNITY_UINT32 length)
{
const char* pch = string;
if (pch != NULL)
{
- while (*pch && (_UU32)(pch - string) < length)
+ while (*pch && (UNITY_UINT32)(pch - string) < length)
{
/* printable characters plus CR & LF are printed */
if ((*pch <= 126) && (*pch >= 32))
{
UNITY_OUTPUT_CHAR(*pch);
@@ -139,55 +139,55 @@
/* unprintable characters are shown as codes */
else
{
UNITY_OUTPUT_CHAR('\\');
UNITY_OUTPUT_CHAR('x');
- UnityPrintNumberHex((_U_UINT)*pch, 2);
+ UnityPrintNumberHex((UNITY_UINT)*pch, 2);
}
pch++;
}
}
}
/*-----------------------------------------------*/
-void UnityPrintNumberByStyle(const _U_SINT number, const UNITY_DISPLAY_STYLE_T style)
+void UnityPrintNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T style)
{
if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
{
UnityPrintNumber(number);
}
else if ((style & UNITY_DISPLAY_RANGE_UINT) == UNITY_DISPLAY_RANGE_UINT)
{
- UnityPrintNumberUnsigned( (_U_UINT)number & UnitySizeMask[((_U_UINT)style & (_U_UINT)0x0F) - 1] );
+ UnityPrintNumberUnsigned( (UNITY_UINT)number & UnitySizeMask[((UNITY_UINT)style & (UNITY_UINT)0x0F) - 1] );
}
else
{
UNITY_OUTPUT_CHAR('0');
UNITY_OUTPUT_CHAR('x');
- UnityPrintNumberHex((_U_UINT)number, (char)((style & 0x000F) << 1));
+ UnityPrintNumberHex((UNITY_UINT)number, (char)((style & 0x000F) << 1));
}
}
/*-----------------------------------------------*/
-void UnityPrintNumber(const _U_SINT number_to_print)
+void UnityPrintNumber(const UNITY_INT number_to_print)
{
- _U_UINT number = (_U_UINT)number_to_print;
+ UNITY_UINT number = (UNITY_UINT)number_to_print;
if (number_to_print < 0)
{
/* A negative number, including MIN negative */
UNITY_OUTPUT_CHAR('-');
- number = (_U_UINT)(-number_to_print);
+ number = (UNITY_UINT)(-number_to_print);
}
UnityPrintNumberUnsigned(number);
}
/*-----------------------------------------------
* basically do an itoa using as little ram as possible */
-void UnityPrintNumberUnsigned(const _U_UINT number)
+void UnityPrintNumberUnsigned(const UNITY_UINT number)
{
- _U_UINT divisor = 1;
+ UNITY_UINT divisor = 1;
/* figure out initial divisor */
while (number / divisor > 9)
{
divisor *= 10;
@@ -201,13 +201,13 @@
}
while (divisor > 0);
}
/*-----------------------------------------------*/
-void UnityPrintNumberHex(const _U_UINT number, const char nibbles_to_print)
+void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print)
{
- _U_UINT nibble;
+ UNITY_UINT nibble;
char nibbles = nibbles_to_print;
while (nibbles > 0)
{
nibble = (number >> (--nibbles << 2)) & 0x0000000F;
@@ -221,14 +221,14 @@
}
}
}
/*-----------------------------------------------*/
-void UnityPrintMask(const _U_UINT mask, const _U_UINT number)
+void UnityPrintMask(const UNITY_UINT mask, const UNITY_UINT number)
{
- _U_UINT current_bit = (_U_UINT)1 << (UNITY_INT_WIDTH - 1);
- _US32 i;
+ UNITY_UINT current_bit = (UNITY_UINT)1 << (UNITY_INT_WIDTH - 1);
+ UNITY_INT32 i;
for (i = 0; i < UNITY_INT_WIDTH; i++)
{
if (current_bit & mask)
{
@@ -259,11 +259,11 @@
# else
# define UNITY_VERBOSE_NUMBER_MAX_LENGTH 47
# endif
#endif
-void UnityPrintFloat(_UD number)
+void UnityPrintFloat(UNITY_DOUBLE number)
{
char TempBuffer[UNITY_VERBOSE_NUMBER_MAX_LENGTH + 1];
snprintf(TempBuffer, sizeof(TempBuffer), "%.6f", number);
UnityPrint(TempBuffer);
}
@@ -288,11 +288,11 @@
static void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line)
{
#ifndef UNITY_FIXTURES
UnityPrint(file);
UNITY_OUTPUT_CHAR(':');
- UnityPrintNumber((_U_SINT)line);
+ UnityPrintNumber((UNITY_INT)line);
UNITY_OUTPUT_CHAR(':');
UnityPrint(Unity.CurrentTestName);
UNITY_OUTPUT_CHAR(':');
#else
UNITY_UNUSED(file);
@@ -387,11 +387,11 @@
UnityPrint(UnityStrNull);
}
}
/*-----------------------------------------------*/
-static void UnityPrintExpectedAndActualStringsLen(const char* expected, const char* actual, const _UU32 length)
+static void UnityPrintExpectedAndActualStringsLen(const char* expected, const char* actual, const UNITY_UINT32 length)
{
UnityPrint(UnityStrExpected);
if (expected != NULL)
{
UNITY_OUTPUT_CHAR('\'');
@@ -451,33 +451,33 @@
/*-----------------------------------------------
* Assertion Functions
*-----------------------------------------------*/
-void UnityAssertBits(const _U_SINT mask,
- const _U_SINT expected,
- const _U_SINT actual,
+void UnityAssertBits(const UNITY_INT mask,
+ const UNITY_INT expected,
+ const UNITY_INT actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber)
{
UNITY_SKIP_EXECUTION;
if ((mask & expected) != (mask & actual))
{
UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrExpected);
- UnityPrintMask((_U_UINT)mask, (_U_UINT)expected);
+ UnityPrintMask((UNITY_UINT)mask, (UNITY_UINT)expected);
UnityPrint(UnityStrWas);
- UnityPrintMask((_U_UINT)mask, (_U_UINT)actual);
+ UnityPrintMask((UNITY_UINT)mask, (UNITY_UINT)actual);
UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL;
}
}
/*-----------------------------------------------*/
-void UnityAssertEqualNumber(const _U_SINT expected,
- const _U_SINT actual,
+void UnityAssertEqualNumber(const UNITY_INT expected,
+ const UNITY_INT actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style)
{
UNITY_SKIP_EXECUTION;
@@ -502,16 +502,16 @@
UNITY_FAIL_AND_BAIL; }
/*-----------------------------------------------*/
void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
UNITY_INTERNAL_PTR actual,
- const _UU32 num_elements,
+ const UNITY_UINT32 num_elements,
const char* msg,
const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style)
{
- _UU32 elements = num_elements;
+ UNITY_UINT32 elements = num_elements;
UNITY_INTERNAL_PTR ptr_exp = (UNITY_INTERNAL_PTR)expected;
UNITY_INTERNAL_PTR ptr_act = (UNITY_INTERNAL_PTR)actual;
UNITY_SKIP_EXECUTION;
@@ -531,87 +531,87 @@
case UNITY_DISPLAY_STYLE_HEX8:
case UNITY_DISPLAY_STYLE_INT8:
case UNITY_DISPLAY_STYLE_UINT8:
while (elements--)
{
- if (*(UNITY_PTR_ATTRIBUTE const _US8*)ptr_exp != *(UNITY_PTR_ATTRIBUTE const _US8*)ptr_act)
+ if (*(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)ptr_exp != *(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)ptr_act)
{
UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrElement);
UnityPrintNumberUnsigned(num_elements - elements - 1);
UnityPrint(UnityStrExpected);
- UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const _US8*)ptr_exp, style);
+ UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)ptr_exp, style);
UnityPrint(UnityStrWas);
- UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const _US8*)ptr_act, style);
+ UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT8*)ptr_act, style);
UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL;
}
- ptr_exp = (UNITY_INTERNAL_PTR)((_UP)ptr_exp + 1);
- ptr_act = (UNITY_INTERNAL_PTR)((_UP)ptr_act + 1);
+ ptr_exp = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_exp + 1);
+ ptr_act = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_act + 1);
}
break;
case UNITY_DISPLAY_STYLE_HEX16:
case UNITY_DISPLAY_STYLE_INT16:
case UNITY_DISPLAY_STYLE_UINT16:
while (elements--)
{
- if (*(UNITY_PTR_ATTRIBUTE const _US16*)ptr_exp != *(UNITY_PTR_ATTRIBUTE const _US16*)ptr_act)
+ if (*(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)ptr_exp != *(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)ptr_act)
{
UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrElement);
UnityPrintNumberUnsigned(num_elements - elements - 1);
UnityPrint(UnityStrExpected);
- UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const _US16*)ptr_exp, style);
+ UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)ptr_exp, style);
UnityPrint(UnityStrWas);
- UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const _US16*)ptr_act, style);
+ UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT16*)ptr_act, style);
UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL;
}
- ptr_exp = (UNITY_INTERNAL_PTR)((_UP)ptr_exp + 2);
- ptr_act = (UNITY_INTERNAL_PTR)((_UP)ptr_act + 2);
+ ptr_exp = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_exp + 2);
+ ptr_act = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_act + 2);
}
break;
#ifdef UNITY_SUPPORT_64
case UNITY_DISPLAY_STYLE_HEX64:
case UNITY_DISPLAY_STYLE_INT64:
case UNITY_DISPLAY_STYLE_UINT64:
while (elements--)
{
- if (*(UNITY_PTR_ATTRIBUTE const _US64*)ptr_exp != *(UNITY_PTR_ATTRIBUTE const _US64*)ptr_act)
+ if (*(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)ptr_exp != *(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)ptr_act)
{
UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrElement);
UnityPrintNumberUnsigned(num_elements - elements - 1);
UnityPrint(UnityStrExpected);
- UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const _US64*)ptr_exp, style);
+ UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)ptr_exp, style);
UnityPrint(UnityStrWas);
- UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const _US64*)ptr_act, style);
+ UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT64*)ptr_act, style);
UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL;
}
- ptr_exp = (UNITY_INTERNAL_PTR)((_UP)ptr_exp + 8);
- ptr_act = (UNITY_INTERNAL_PTR)((_UP)ptr_act + 8);
+ ptr_exp = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_exp + 8);
+ ptr_act = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_act + 8);
}
break;
#endif
default:
while (elements--)
{
- if (*(UNITY_PTR_ATTRIBUTE const _US32*)ptr_exp != *(UNITY_PTR_ATTRIBUTE const _US32*)ptr_act)
+ if (*(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)ptr_exp != *(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)ptr_act)
{
UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrElement);
UnityPrintNumberUnsigned(num_elements - elements - 1);
UnityPrint(UnityStrExpected);
- UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const _US32*)ptr_exp, style);
+ UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)ptr_exp, style);
UnityPrint(UnityStrWas);
- UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const _US32*)ptr_act, style);
+ UnityPrintNumberByStyle(*(UNITY_PTR_ATTRIBUTE const UNITY_INT32*)ptr_act, style);
UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL;
}
- ptr_exp = (UNITY_INTERNAL_PTR)((_UP)ptr_exp + 4);
- ptr_act = (UNITY_INTERNAL_PTR)((_UP)ptr_act + 4);
+ ptr_exp = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_exp + 4);
+ ptr_act = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_act + 4);
}
break;
}
}
@@ -630,25 +630,25 @@
#else
#define UNITY_NAN_CHECK 0
#endif
#ifndef UNITY_EXCLUDE_FLOAT
-static int UnityFloatsWithin(_UF delta, _UF expected, _UF actual)
+static int UnityFloatsWithin(UNITY_FLOAT delta, UNITY_FLOAT expected, UNITY_FLOAT actual)
{
- _UF diff;
+ UNITY_FLOAT diff;
UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff);
}
-void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE const _UF* expected,
- UNITY_PTR_ATTRIBUTE const _UF* actual,
- const _UU32 num_elements,
+void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* expected,
+ UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* actual,
+ const UNITY_UINT32 num_elements,
const char* msg,
const UNITY_LINE_TYPE lineNumber)
{
- _UU32 elements = num_elements;
- UNITY_PTR_ATTRIBUTE const _UF* ptr_expected = expected;
- UNITY_PTR_ATTRIBUTE const _UF* ptr_actual = actual;
+ UNITY_UINT32 elements = num_elements;
+ UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* ptr_expected = expected;
+ UNITY_PTR_ATTRIBUTE const UNITY_FLOAT* ptr_actual = actual;
UNITY_SKIP_EXECUTION;
if (elements == 0)
{
@@ -680,13 +680,13 @@
ptr_actual++;
}
}
/*-----------------------------------------------*/
-void UnityAssertFloatsWithin(const _UF delta,
- const _UF expected,
- const _UF actual,
+void UnityAssertFloatsWithin(const UNITY_FLOAT delta,
+ const UNITY_FLOAT expected,
+ const UNITY_FLOAT actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber)
{
UNITY_SKIP_EXECUTION;
@@ -706,19 +706,19 @@
UNITY_FAIL_AND_BAIL;
}
}
/*-----------------------------------------------*/
-void UnityAssertFloatSpecial(const _UF actual,
+void UnityAssertFloatSpecial(const UNITY_FLOAT actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber,
const UNITY_FLOAT_TRAIT_T style)
{
const char* trait_names[] = { UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet };
- _U_SINT should_be_trait = ((_U_SINT)style & 1);
- _U_SINT is_trait = !should_be_trait;
- _U_SINT trait_index = (_U_SINT)(style >> 1);
+ UNITY_INT should_be_trait = ((UNITY_INT)style & 1);
+ UNITY_INT is_trait = !should_be_trait;
+ UNITY_INT trait_index = (UNITY_INT)(style >> 1);
UNITY_SKIP_EXECUTION;
switch(style)
{
@@ -773,25 +773,25 @@
#endif /* not UNITY_EXCLUDE_FLOAT */
/*-----------------------------------------------*/
#ifndef UNITY_EXCLUDE_DOUBLE
-static int UnityDoublesWithin(_UD delta, _UD expected, _UD actual)
+static int UnityDoublesWithin(UNITY_DOUBLE delta, UNITY_DOUBLE expected, UNITY_DOUBLE actual)
{
- _UD diff;
+ UNITY_DOUBLE diff;
UNITY_FLOAT_OR_DOUBLE_WITHIN(delta, expected, actual, diff);
}
-void UnityAssertEqualDoubleArray(UNITY_PTR_ATTRIBUTE const _UD* expected,
- UNITY_PTR_ATTRIBUTE const _UD* actual,
- const _UU32 num_elements,
+void UnityAssertEqualDoubleArray(UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* expected,
+ UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* actual,
+ const UNITY_UINT32 num_elements,
const char* msg,
const UNITY_LINE_TYPE lineNumber)
{
- _UU32 elements = num_elements;
- UNITY_PTR_ATTRIBUTE const _UD* ptr_expected = expected;
- UNITY_PTR_ATTRIBUTE const _UD* ptr_actual = actual;
+ UNITY_UINT32 elements = num_elements;
+ UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* ptr_expected = expected;
+ UNITY_PTR_ATTRIBUTE const UNITY_DOUBLE* ptr_actual = actual;
UNITY_SKIP_EXECUTION;
if (elements == 0)
{
@@ -823,13 +823,13 @@
ptr_actual++;
}
}
/*-----------------------------------------------*/
-void UnityAssertDoublesWithin(const _UD delta,
- const _UD expected,
- const _UD actual,
+void UnityAssertDoublesWithin(const UNITY_DOUBLE delta,
+ const UNITY_DOUBLE expected,
+ const UNITY_DOUBLE actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber)
{
UNITY_SKIP_EXECUTION;
@@ -849,19 +849,19 @@
}
}
/*-----------------------------------------------*/
-void UnityAssertDoubleSpecial(const _UD actual,
+void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber,
const UNITY_FLOAT_TRAIT_T style)
{
const char* trait_names[] = { UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet };
- _U_SINT should_be_trait = ((_U_SINT)style & 1);
- _U_SINT is_trait = !should_be_trait;
- _U_SINT trait_index = (_U_SINT)(style >> 1);
+ UNITY_INT should_be_trait = ((UNITY_INT)style & 1);
+ UNITY_INT is_trait = !should_be_trait;
+ UNITY_INT trait_index = (UNITY_INT)(style >> 1);
UNITY_SKIP_EXECUTION;
switch(style)
{
@@ -916,39 +916,39 @@
#endif /* not UNITY_EXCLUDE_DOUBLE */
/*-----------------------------------------------*/
-void UnityAssertNumbersWithin( const _U_UINT delta,
- const _U_SINT expected,
- const _U_SINT actual,
+void UnityAssertNumbersWithin( const UNITY_UINT delta,
+ const UNITY_INT expected,
+ const UNITY_INT actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style)
{
UNITY_SKIP_EXECUTION;
if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
{
if (actual > expected)
- Unity.CurrentTestFailed = ((_U_UINT)(actual - expected) > delta);
+ Unity.CurrentTestFailed = ((UNITY_UINT)(actual - expected) > delta);
else
- Unity.CurrentTestFailed = ((_U_UINT)(expected - actual) > delta);
+ Unity.CurrentTestFailed = ((UNITY_UINT)(expected - actual) > delta);
}
else
{
- if ((_U_UINT)actual > (_U_UINT)expected)
- Unity.CurrentTestFailed = ((_U_UINT)(actual - expected) > delta);
+ if ((UNITY_UINT)actual > (UNITY_UINT)expected)
+ Unity.CurrentTestFailed = ((UNITY_UINT)(actual - expected) > delta);
else
- Unity.CurrentTestFailed = ((_U_UINT)(expected - actual) > delta);
+ Unity.CurrentTestFailed = ((UNITY_UINT)(expected - actual) > delta);
}
if (Unity.CurrentTestFailed)
{
UnityTestResultsFailBegin(lineNumber);
UnityPrint(UnityStrDelta);
- UnityPrintNumberByStyle((_U_SINT)delta, style);
+ UnityPrintNumberByStyle((UNITY_INT)delta, style);
UnityPrint(UnityStrExpected);
UnityPrintNumberByStyle(expected, style);
UnityPrint(UnityStrWas);
UnityPrintNumberByStyle(actual, style);
UnityAddMsgIfSpecified(msg);
@@ -960,11 +960,11 @@
void UnityAssertEqualString(const char* expected,
const char* actual,
const char* msg,
const UNITY_LINE_TYPE lineNumber)
{
- _UU32 i;
+ UNITY_UINT32 i;
UNITY_SKIP_EXECUTION;
/* if both pointers not null compare the strings */
if (expected && actual)
@@ -996,15 +996,15 @@
}
/*-----------------------------------------------*/
void UnityAssertEqualStringLen(const char* expected,
const char* actual,
- const _UU32 length,
+ const UNITY_UINT32 length,
const char* msg,
const UNITY_LINE_TYPE lineNumber)
{
- _UU32 i;
+ UNITY_UINT32 i;
UNITY_SKIP_EXECUTION;
/* if both pointers not null compare the strings */
if (expected && actual)
@@ -1037,15 +1037,15 @@
/*-----------------------------------------------*/
void UnityAssertEqualStringArray( const char** expected,
const char** actual,
- const _UU32 num_elements,
+ const UNITY_UINT32 num_elements,
const char* msg,
const UNITY_LINE_TYPE lineNumber)
{
- _UU32 i, j = 0;
+ UNITY_UINT32 i, j = 0;
UNITY_SKIP_EXECUTION;
/* if no elements, it's an error */
if (num_elements == 0)
@@ -1094,19 +1094,19 @@
}
/*-----------------------------------------------*/
void UnityAssertEqualMemory( UNITY_INTERNAL_PTR expected,
UNITY_INTERNAL_PTR actual,
- const _UU32 length,
- const _UU32 num_elements,
+ const UNITY_UINT32 length,
+ const UNITY_UINT32 num_elements,
const char* msg,
const UNITY_LINE_TYPE lineNumber)
{
UNITY_PTR_ATTRIBUTE const unsigned char* ptr_exp = (UNITY_PTR_ATTRIBUTE const unsigned char*)expected;
UNITY_PTR_ATTRIBUTE const unsigned char* ptr_act = (UNITY_PTR_ATTRIBUTE const unsigned char*)actual;
- _UU32 elements = num_elements;
- _UU32 bytes;
+ UNITY_UINT32 elements = num_elements;
+ UNITY_UINT32 bytes;
UNITY_SKIP_EXECUTION;
if ((elements == 0) || (length == 0))
{
@@ -1137,12 +1137,12 @@
UnityPrint(UnityStrWas);
UnityPrintNumberByStyle(*ptr_act, UNITY_DISPLAY_STYLE_HEX8);
UnityAddMsgIfSpecified(msg);
UNITY_FAIL_AND_BAIL;
}
- ptr_exp = (UNITY_INTERNAL_PTR)((_UP)ptr_exp + 1);
- ptr_act = (UNITY_INTERNAL_PTR)((_UP)ptr_act + 1);
+ ptr_exp = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_exp + 1);
+ ptr_act = (UNITY_INTERNAL_PTR)((UNITY_PTR)ptr_act + 1);
}
}
}
/*-----------------------------------------------
@@ -1247,14 +1247,14 @@
int UnityEnd(void)
{
UNITY_PRINT_EOL();
UnityPrint(UnityStrBreaker);
UNITY_PRINT_EOL();
- UnityPrintNumber((_U_SINT)(Unity.NumberOfTests));
+ UnityPrintNumber((UNITY_INT)(Unity.NumberOfTests));
UnityPrint(UnityStrResultsTests);
- UnityPrintNumber((_U_SINT)(Unity.TestFailures));
+ UnityPrintNumber((UNITY_INT)(Unity.TestFailures));
UnityPrint(UnityStrResultsFailures);
- UnityPrintNumber((_U_SINT)(Unity.TestIgnores));
+ UnityPrintNumber((UNITY_INT)(Unity.TestIgnores));
UnityPrint(UnityStrResultsIgnored);
UNITY_PRINT_EOL();
if (Unity.TestFailures == 0U)
{
UnityPrintOk();