7#ifndef UNITY_INTERNALS_H
8#define UNITY_INTERNALS_H
10#ifdef UNITY_INCLUDE_CONFIG_H
11#include "unity_config.h"
14#ifndef UNITY_EXCLUDE_SETJMP_H
18#ifndef UNITY_EXCLUDE_MATH_H
22#ifndef UNITY_EXCLUDE_STDDEF_H
26#ifdef UNITY_INCLUDE_PRINT_FORMATTED
35#ifndef UNITY_EXCLUDE_STDINT_H
39#ifndef UNITY_EXCLUDE_LIMITS_H
53#ifndef UNITY_INT_WIDTH
55#if (UINT_MAX == 0xFFFF)
56#define UNITY_INT_WIDTH (16)
57#elif (UINT_MAX == 0xFFFFFFFF)
58#define UNITY_INT_WIDTH (32)
59#elif (UINT_MAX == 0xFFFFFFFFFFFFFFFF)
60#define UNITY_INT_WIDTH (64)
63#define UNITY_INT_WIDTH (32)
68#ifndef UNITY_LONG_WIDTH
70#if (ULONG_MAX == 0xFFFF)
71#define UNITY_LONG_WIDTH (16)
72#elif (ULONG_MAX == 0xFFFFFFFF)
73#define UNITY_LONG_WIDTH (32)
74#elif (ULONG_MAX == 0xFFFFFFFFFFFFFFFF)
75#define UNITY_LONG_WIDTH (64)
78#define UNITY_LONG_WIDTH (32)
83#ifndef UNITY_POINTER_WIDTH
85#if (UINTPTR_MAX <= 0xFFFF)
86#define UNITY_POINTER_WIDTH (16)
87#elif (UINTPTR_MAX <= 0xFFFFFFFF)
88#define UNITY_POINTER_WIDTH (32)
89#elif (UINTPTR_MAX <= 0xFFFFFFFFFFFFFFFF)
90#define UNITY_POINTER_WIDTH (64)
93#define UNITY_POINTER_WIDTH UNITY_LONG_WIDTH
101#if (UNITY_INT_WIDTH == 32)
102typedef unsigned char UNITY_UINT8;
103typedef unsigned short UNITY_UINT16;
104typedef unsigned int UNITY_UINT32;
105typedef signed char UNITY_INT8;
106typedef signed short UNITY_INT16;
107typedef signed int UNITY_INT32;
108#elif (UNITY_INT_WIDTH == 16)
109typedef unsigned char UNITY_UINT8;
110typedef unsigned int UNITY_UINT16;
111typedef unsigned long UNITY_UINT32;
112typedef signed char UNITY_INT8;
113typedef signed int UNITY_INT16;
114typedef signed long UNITY_INT32;
116#error Invalid UNITY_INT_WIDTH specified! (16 or 32 are supported)
124#ifndef UNITY_SUPPORT_64
125#if UNITY_LONG_WIDTH == 64 || UNITY_POINTER_WIDTH == 64
126#define UNITY_SUPPORT_64
131#ifndef UNITY_SUPPORT_64
133typedef UNITY_UINT32 UNITY_UINT;
134typedef UNITY_INT32 UNITY_INT;
135#define UNITY_MAX_NIBBLES \
140#if (UNITY_LONG_WIDTH == 32)
141typedef unsigned long long UNITY_UINT64;
142typedef signed long long UNITY_INT64;
143#elif (UNITY_LONG_WIDTH == 64)
144typedef unsigned long UNITY_UINT64;
145typedef signed long UNITY_INT64;
147#error Invalid UNITY_LONG_WIDTH specified! (32 or 64 are supported)
149typedef UNITY_UINT64 UNITY_UINT;
150typedef UNITY_INT64 UNITY_INT;
151#define UNITY_MAX_NIBBLES \
160#if (UNITY_POINTER_WIDTH == 32)
161#define UNITY_PTR_TO_INT UNITY_INT32
162#define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX32
163#elif (UNITY_POINTER_WIDTH == 64)
164#define UNITY_PTR_TO_INT UNITY_INT64
165#define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX64
166#elif (UNITY_POINTER_WIDTH == 16)
167#define UNITY_PTR_TO_INT UNITY_INT16
168#define UNITY_DISPLAY_STYLE_POINTER UNITY_DISPLAY_STYLE_HEX16
170#error Invalid UNITY_POINTER_WIDTH specified! (16, 32 or 64 are supported)
173#ifndef UNITY_PTR_ATTRIBUTE
174#define UNITY_PTR_ATTRIBUTE
177#ifndef UNITY_INTERNAL_PTR
178#define UNITY_INTERNAL_PTR UNITY_PTR_ATTRIBUTE const void *
185#ifdef UNITY_EXCLUDE_FLOAT
188#ifndef UNITY_EXCLUDE_DOUBLE
189#define UNITY_EXCLUDE_DOUBLE
191#ifndef UNITY_EXCLUDE_FLOAT_PRINT
192#define UNITY_EXCLUDE_FLOAT_PRINT
198#ifndef UNITY_FLOAT_PRECISION
199#define UNITY_FLOAT_PRECISION (0.00001f)
201#ifndef UNITY_FLOAT_TYPE
202#define UNITY_FLOAT_TYPE float
204typedef UNITY_FLOAT_TYPE UNITY_FLOAT;
209#define isinf(n) (isnan((n) - (n)) && !isnan(n))
215#define isnan(n) ((n != n) ? 1 : 0)
225#if defined(UNITY_EXCLUDE_DOUBLE) || !defined(UNITY_INCLUDE_DOUBLE)
228#ifndef UNITY_EXCLUDE_DOUBLE
229#define UNITY_EXCLUDE_DOUBLE
231#undef UNITY_INCLUDE_DOUBLE
234#ifndef UNITY_EXCLUDE_FLOAT
235#ifndef UNITY_DOUBLE_TYPE
236#define UNITY_DOUBLE_TYPE double
238typedef UNITY_FLOAT UNITY_DOUBLE;
246#ifndef UNITY_DOUBLE_PRECISION
247#define UNITY_DOUBLE_PRECISION (1e-12)
250#ifndef UNITY_DOUBLE_TYPE
251#define UNITY_DOUBLE_TYPE double
253typedef UNITY_DOUBLE_TYPE UNITY_DOUBLE;
260#ifndef UNITY_OUTPUT_CHAR
263#define UNITY_OUTPUT_CHAR(a) (void)putchar(a)
267#ifdef UNITY_OUTPUT_CHAR_HEADER_DECLARATION
268extern void UNITY_OUTPUT_CHAR_HEADER_DECLARATION;
272#ifndef UNITY_OUTPUT_FLUSH
273#ifdef UNITY_USE_FLUSH_STDOUT
276#define UNITY_OUTPUT_FLUSH() (void)fflush(stdout)
279#define UNITY_OUTPUT_FLUSH()
284#ifdef UNITY_OUTPUT_FLUSH_HEADER_DECLARATION
285extern void UNITY_OUTPUT_FLUSH_HEADER_DECLARATION;
289#ifndef UNITY_OUTPUT_FLUSH
290#define UNITY_FLUSH_CALL()
292#define UNITY_FLUSH_CALL() UNITY_OUTPUT_FLUSH()
295#ifndef UNITY_PRINT_EOL
296#define UNITY_PRINT_EOL() UNITY_OUTPUT_CHAR('\n')
299#ifndef UNITY_OUTPUT_START
300#define UNITY_OUTPUT_START()
303#ifndef UNITY_OUTPUT_COMPLETE
304#define UNITY_OUTPUT_COMPLETE()
307#ifdef UNITY_INCLUDE_EXEC_TIME
308#if !defined(UNITY_EXEC_TIME_START) && !defined(UNITY_EXEC_TIME_STOP) && \
309 !defined(UNITY_PRINT_EXEC_TIME) && !defined(UNITY_TIME_TYPE)
313#if defined(UNITY_CLOCK_MS)
316#define UNITY_TIME_TYPE UNITY_UINT
317#define UNITY_EXEC_TIME_START() Unity.CurrentTestStartTime = UNITY_CLOCK_MS()
318#define UNITY_EXEC_TIME_STOP() Unity.CurrentTestStopTime = UNITY_CLOCK_MS()
319#define UNITY_PRINT_EXEC_TIME() \
321 UNITY_UINT execTimeMs = \
322 (Unity.CurrentTestStopTime - Unity.CurrentTestStartTime); \
324 UnityPrintNumberUnsigned(execTimeMs); \
325 UnityPrint(" ms)"); \
329#define UNITY_TIME_TYPE clock_t
330#define UNITY_GET_TIME(t) t = (clock_t)((clock() * 1000) / CLOCKS_PER_SEC)
331#define UNITY_EXEC_TIME_START() UNITY_GET_TIME(Unity.CurrentTestStartTime)
332#define UNITY_EXEC_TIME_STOP() UNITY_GET_TIME(Unity.CurrentTestStopTime)
333#define UNITY_PRINT_EXEC_TIME() \
335 UNITY_UINT execTimeMs = \
336 (Unity.CurrentTestStopTime - Unity.CurrentTestStartTime); \
338 UnityPrintNumberUnsigned(execTimeMs); \
339 UnityPrint(" ms)"); \
341#elif defined(__unix__)
343#define UNITY_TIME_TYPE struct timespec
344#define UNITY_GET_TIME(t) clock_gettime(CLOCK_MONOTONIC, &t)
345#define UNITY_EXEC_TIME_START() UNITY_GET_TIME(Unity.CurrentTestStartTime)
346#define UNITY_EXEC_TIME_STOP() UNITY_GET_TIME(Unity.CurrentTestStopTime)
347#define UNITY_PRINT_EXEC_TIME() \
349 UNITY_UINT execTimeMs = ((Unity.CurrentTestStopTime.tv_sec - \
350 Unity.CurrentTestStartTime.tv_sec) * \
352 execTimeMs += ((Unity.CurrentTestStopTime.tv_nsec - \
353 Unity.CurrentTestStartTime.tv_nsec) / \
356 UnityPrintNumberUnsigned(execTimeMs); \
357 UnityPrint(" ms)"); \
363#ifndef UNITY_EXEC_TIME_START
364#define UNITY_EXEC_TIME_START() \
369#ifndef UNITY_EXEC_TIME_STOP
370#define UNITY_EXEC_TIME_STOP() \
375#ifndef UNITY_TIME_TYPE
376#define UNITY_TIME_TYPE UNITY_UINT
379#ifndef UNITY_PRINT_EXEC_TIME
380#define UNITY_PRINT_EXEC_TIME() \
389#ifndef UNITY_LINE_TYPE
390#define UNITY_LINE_TYPE UNITY_UINT
393#ifndef UNITY_COUNTER_TYPE
394#define UNITY_COUNTER_TYPE UNITY_UINT
401typedef void (*UnityTestFunction)(void);
403#define UNITY_DISPLAY_RANGE_INT (0x10)
404#define UNITY_DISPLAY_RANGE_UINT (0x20)
405#define UNITY_DISPLAY_RANGE_HEX (0x40)
406#define UNITY_DISPLAY_RANGE_CHAR (0x80)
409 UNITY_DISPLAY_STYLE_INT = (UNITY_INT_WIDTH / 8) + UNITY_DISPLAY_RANGE_INT,
410 UNITY_DISPLAY_STYLE_INT8 = 1 + UNITY_DISPLAY_RANGE_INT,
411 UNITY_DISPLAY_STYLE_INT16 = 2 + UNITY_DISPLAY_RANGE_INT,
412 UNITY_DISPLAY_STYLE_INT32 = 4 + UNITY_DISPLAY_RANGE_INT,
413#ifdef UNITY_SUPPORT_64
414 UNITY_DISPLAY_STYLE_INT64 = 8 + UNITY_DISPLAY_RANGE_INT,
417 UNITY_DISPLAY_STYLE_UINT = (UNITY_INT_WIDTH / 8) + UNITY_DISPLAY_RANGE_UINT,
418 UNITY_DISPLAY_STYLE_UINT8 = 1 + UNITY_DISPLAY_RANGE_UINT,
419 UNITY_DISPLAY_STYLE_UINT16 = 2 + UNITY_DISPLAY_RANGE_UINT,
420 UNITY_DISPLAY_STYLE_UINT32 = 4 + UNITY_DISPLAY_RANGE_UINT,
421#ifdef UNITY_SUPPORT_64
422 UNITY_DISPLAY_STYLE_UINT64 = 8 + UNITY_DISPLAY_RANGE_UINT,
425 UNITY_DISPLAY_STYLE_HEX8 = 1 + UNITY_DISPLAY_RANGE_HEX,
426 UNITY_DISPLAY_STYLE_HEX16 = 2 + UNITY_DISPLAY_RANGE_HEX,
427 UNITY_DISPLAY_STYLE_HEX32 = 4 + UNITY_DISPLAY_RANGE_HEX,
428#ifdef UNITY_SUPPORT_64
429 UNITY_DISPLAY_STYLE_HEX64 = 8 + UNITY_DISPLAY_RANGE_HEX,
432 UNITY_DISPLAY_STYLE_CHAR =
433 1 + UNITY_DISPLAY_RANGE_CHAR + UNITY_DISPLAY_RANGE_INT,
435 UNITY_DISPLAY_STYLE_UNKNOWN
436} UNITY_DISPLAY_STYLE_T;
440 UNITY_EQUAL_TO = 0x1,
441 UNITY_GREATER_THAN = 0x2,
442 UNITY_GREATER_OR_EQUAL = 0x2 + UNITY_EQUAL_TO,
443 UNITY_SMALLER_THAN = 0x4,
444 UNITY_SMALLER_OR_EQUAL = 0x4 + UNITY_EQUAL_TO,
445 UNITY_NOT_EQUAL = 0x0,
449#ifndef UNITY_EXCLUDE_FLOAT
450typedef enum UNITY_FLOAT_TRAIT {
451 UNITY_FLOAT_IS_NOT_INF = 0,
453 UNITY_FLOAT_IS_NOT_NEG_INF,
454 UNITY_FLOAT_IS_NEG_INF,
455 UNITY_FLOAT_IS_NOT_NAN,
457 UNITY_FLOAT_IS_NOT_DET,
459 UNITY_FLOAT_INVALID_TRAIT
460} UNITY_FLOAT_TRAIT_T;
464 UNITY_ARRAY_TO_VAL = 0,
465 UNITY_ARRAY_TO_ARRAY,
470 const char *TestFile;
471 const char *CurrentTestName;
472#ifndef UNITY_EXCLUDE_DETAILS
473 const char *CurrentDetail1;
474 const char *CurrentDetail2;
476 UNITY_LINE_TYPE CurrentTestLineNumber;
477 UNITY_COUNTER_TYPE NumberOfTests;
478 UNITY_COUNTER_TYPE TestFailures;
479 UNITY_COUNTER_TYPE TestIgnores;
480 UNITY_COUNTER_TYPE CurrentTestFailed;
481 UNITY_COUNTER_TYPE CurrentTestIgnored;
482#ifdef UNITY_INCLUDE_EXEC_TIME
483 UNITY_TIME_TYPE CurrentTestStartTime;
484 UNITY_TIME_TYPE CurrentTestStopTime;
486#ifndef UNITY_EXCLUDE_SETJMP_H
497void UnityBegin(
const char *filename);
499void UnitySetTestFile(
const char *filename);
500void UnityConcludeTest(
void);
503void UnityDefaultTestRun(UnityTestFunction Func,
const char *FuncName,
504 const int FuncLineNum);
506#define UNITY_SKIP_DEFAULT_RUNNER
513#ifdef UNITY_EXCLUDE_DETAILS
514#define UNITY_CLR_DETAILS()
515#define UNITY_SET_DETAIL(d1)
516#define UNITY_SET_DETAILS(d1, d2)
518#define UNITY_CLR_DETAILS() \
520 Unity.CurrentDetail1 = 0; \
521 Unity.CurrentDetail2 = 0; \
523#define UNITY_SET_DETAIL(d1) \
525 Unity.CurrentDetail1 = (d1); \
526 Unity.CurrentDetail2 = 0; \
528#define UNITY_SET_DETAILS(d1, d2) \
530 Unity.CurrentDetail1 = (d1); \
531 Unity.CurrentDetail2 = (d2); \
534#ifndef UNITY_DETAIL1_NAME
535#define UNITY_DETAIL1_NAME "Function"
538#ifndef UNITY_DETAIL2_NAME
539#define UNITY_DETAIL2_NAME "Argument"
543#ifdef UNITY_PRINT_TEST_CONTEXT
544void UNITY_PRINT_TEST_CONTEXT(
void);
551void UnityPrint(
const char *
string);
553#ifdef UNITY_INCLUDE_PRINT_FORMATTED
554void UnityPrintF(
const UNITY_LINE_TYPE line,
const char *format, ...);
557void UnityPrintLen(
const char *
string,
const UNITY_UINT32 length);
558void UnityPrintMask(
const UNITY_UINT mask,
const UNITY_UINT number);
559void UnityPrintNumberByStyle(
const UNITY_INT number,
560 const UNITY_DISPLAY_STYLE_T style);
561void UnityPrintNumber(
const UNITY_INT number_to_print);
562void UnityPrintNumberUnsigned(
const UNITY_UINT number);
563void UnityPrintNumberHex(
const UNITY_UINT number,
const char nibbles_to_print);
565#ifndef UNITY_EXCLUDE_FLOAT_PRINT
566void UnityPrintFloat(
const UNITY_DOUBLE input_number);
577void UnityAssertEqualNumber(
const UNITY_INT expected,
const UNITY_INT actual,
578 const char *msg,
const UNITY_LINE_TYPE lineNumber,
579 const UNITY_DISPLAY_STYLE_T style);
581void UnityAssertGreaterOrLessOrEqualNumber(
const UNITY_INT threshold,
582 const UNITY_INT actual,
583 const UNITY_COMPARISON_T compare,
585 const UNITY_LINE_TYPE lineNumber,
586 const UNITY_DISPLAY_STYLE_T style);
588void UnityAssertEqualIntArray(UNITY_INTERNAL_PTR expected,
589 UNITY_INTERNAL_PTR actual,
590 const UNITY_UINT32 num_elements,
const char *msg,
591 const UNITY_LINE_TYPE lineNumber,
592 const UNITY_DISPLAY_STYLE_T style,
593 const UNITY_FLAGS_T flags);
595void UnityAssertBits(
const UNITY_INT mask,
const UNITY_INT expected,
596 const UNITY_INT actual,
const char *msg,
597 const UNITY_LINE_TYPE lineNumber);
599void UnityAssertEqualString(
const char *expected,
const char *actual,
600 const char *msg,
const UNITY_LINE_TYPE lineNumber);
602void UnityAssertEqualStringLen(
const char *expected,
const char *actual,
603 const UNITY_UINT32 length,
const char *msg,
604 const UNITY_LINE_TYPE lineNumber);
606void UnityAssertEqualStringArray(UNITY_INTERNAL_PTR expected,
608 const UNITY_UINT32 num_elements,
610 const UNITY_LINE_TYPE lineNumber,
611 const UNITY_FLAGS_T flags);
613void UnityAssertEqualMemory(UNITY_INTERNAL_PTR expected,
614 UNITY_INTERNAL_PTR actual,
615 const UNITY_UINT32 length,
616 const UNITY_UINT32 num_elements,
const char *msg,
617 const UNITY_LINE_TYPE lineNumber,
618 const UNITY_FLAGS_T flags);
620void UnityAssertNumbersWithin(
const UNITY_UINT delta,
const UNITY_INT expected,
621 const UNITY_INT actual,
const char *msg,
622 const UNITY_LINE_TYPE lineNumber,
623 const UNITY_DISPLAY_STYLE_T style);
625void UnityAssertNumbersArrayWithin(
626 const UNITY_UINT delta, UNITY_INTERNAL_PTR expected,
627 UNITY_INTERNAL_PTR actual,
const UNITY_UINT32 num_elements,
const char *msg,
628 const UNITY_LINE_TYPE lineNumber,
const UNITY_DISPLAY_STYLE_T style,
629 const UNITY_FLAGS_T flags);
631void UnityFail(
const char *message,
const UNITY_LINE_TYPE line);
632void UnityIgnore(
const char *message,
const UNITY_LINE_TYPE line);
633void UnityMessage(
const char *message,
const UNITY_LINE_TYPE line);
635#ifndef UNITY_EXCLUDE_FLOAT
636void UnityAssertFloatsWithin(
const UNITY_FLOAT delta,
637 const UNITY_FLOAT expected,
638 const UNITY_FLOAT actual,
const char *msg,
639 const UNITY_LINE_TYPE lineNumber);
641void UnityAssertEqualFloatArray(UNITY_PTR_ATTRIBUTE
const UNITY_FLOAT *expected,
642 UNITY_PTR_ATTRIBUTE
const UNITY_FLOAT *actual,
643 const UNITY_UINT32 num_elements,
645 const UNITY_LINE_TYPE lineNumber,
646 const UNITY_FLAGS_T flags);
648void UnityAssertFloatSpecial(
const UNITY_FLOAT actual,
const char *msg,
649 const UNITY_LINE_TYPE lineNumber,
650 const UNITY_FLOAT_TRAIT_T style);
653#ifndef UNITY_EXCLUDE_DOUBLE
654void UnityAssertDoublesWithin(
const UNITY_DOUBLE delta,
655 const UNITY_DOUBLE expected,
656 const UNITY_DOUBLE actual,
const char *msg,
657 const UNITY_LINE_TYPE lineNumber);
659void UnityAssertEqualDoubleArray(
660 UNITY_PTR_ATTRIBUTE
const UNITY_DOUBLE *expected,
661 UNITY_PTR_ATTRIBUTE
const UNITY_DOUBLE *actual,
662 const UNITY_UINT32 num_elements,
const char *msg,
663 const UNITY_LINE_TYPE lineNumber,
const UNITY_FLAGS_T flags);
665void UnityAssertDoubleSpecial(
const UNITY_DOUBLE actual,
const char *msg,
666 const UNITY_LINE_TYPE lineNumber,
667 const UNITY_FLOAT_TRAIT_T style);
674UNITY_INTERNAL_PTR UnityNumToPtr(
const UNITY_INT num,
const UNITY_UINT8 size);
675#ifndef UNITY_EXCLUDE_FLOAT
676UNITY_INTERNAL_PTR UnityFloatToPtr(
const float num);
678#ifndef UNITY_EXCLUDE_DOUBLE
679UNITY_INTERNAL_PTR UnityDoubleToPtr(
const double num);
686extern const char UnityStrOk[];
687extern const char UnityStrPass[];
688extern const char UnityStrFail[];
689extern const char UnityStrIgnore[];
691extern const char UnityStrErrFloat[];
692extern const char UnityStrErrDouble[];
693extern const char UnityStrErr64[];
694extern const char UnityStrErrShorthand[];
700#ifndef UNITY_EXCLUDE_SETJMP_H
701#define TEST_PROTECT() (setjmp(Unity.AbortFrame) == 0)
702#define TEST_ABORT() longjmp(Unity.AbortFrame, 1)
704#define TEST_PROTECT() 1
705#define TEST_ABORT() return
711#ifdef __STDC_VERSION__
712#if __STDC_VERSION__ >= 199901L
713#define UNITY_SUPPORT_VARIADIC_MACROS
716#ifdef UNITY_SUPPORT_VARIADIC_MACROS
717#define RUN_TEST(...) \
718 UnityDefaultTestRun(RUN_TEST_FIRST(__VA_ARGS__), RUN_TEST_SECOND(__VA_ARGS__))
719#define RUN_TEST_FIRST(...) RUN_TEST_FIRST_HELPER(__VA_ARGS__, throwaway)
720#define RUN_TEST_FIRST_HELPER(first, ...) (first), #first
721#define RUN_TEST_SECOND(...) \
722 RUN_TEST_SECOND_HELPER(__VA_ARGS__, __LINE__, throwaway)
723#define RUN_TEST_SECOND_HELPER(first, second, ...) (second)
731#define RUN_TEST(func, num) UnityDefaultTestRun(func, #func, num)
733#define RUN_TEST(func) UnityDefaultTestRun(func, #func, __LINE__)
737#define TEST_LINE_NUM (Unity.CurrentTestLineNumber)
738#define TEST_IS_IGNORED (Unity.CurrentTestIgnored)
739#define UNITY_NEW_TEST(a) \
740 Unity.CurrentTestName = (a); \
741 Unity.CurrentTestLineNumber = (UNITY_LINE_TYPE)(__LINE__); \
742 Unity.NumberOfTests++;
745#define UNITY_BEGIN() UnityBegin(__FILE__)
749#define UNITY_END() UnityEnd()
752#ifndef UNITY_SHORTHAND_AS_INT
753#ifndef UNITY_SHORTHAND_AS_MEM
754#ifndef UNITY_SHORTHAND_AS_NONE
755#ifndef UNITY_SHORTHAND_AS_RAW
756#define UNITY_SHORTHAND_AS_OLD
766#ifdef UNITY_USE_COMMAND_LINE_ARGS
767int UnityParseOptions(
int argc,
char **argv);
768int UnityTestMatches(
void);
775#define UNITY_TEST_FAIL(line, message) \
776 UnityFail((message), (UNITY_LINE_TYPE)(line))
777#define UNITY_TEST_IGNORE(line, message) \
778 UnityIgnore((message), (UNITY_LINE_TYPE)(line))
784#define UNITY_TEST_ASSERT(condition, line, message) \
788 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), (message)); \
791#define UNITY_TEST_ASSERT_NULL(pointer, line, message) \
792 UNITY_TEST_ASSERT(((pointer) == NULL), (UNITY_LINE_TYPE)(line), (message))
793#define UNITY_TEST_ASSERT_NOT_NULL(pointer, line, message) \
794 UNITY_TEST_ASSERT(((pointer) != NULL), (UNITY_LINE_TYPE)(line), (message))
795#define UNITY_TEST_ASSERT_EMPTY(pointer, line, message) \
796 UNITY_TEST_ASSERT(((pointer[0]) == 0), (UNITY_LINE_TYPE)(line), (message))
797#define UNITY_TEST_ASSERT_NOT_EMPTY(pointer, line, message) \
798 UNITY_TEST_ASSERT(((pointer[0]) != 0), (UNITY_LINE_TYPE)(line), (message))
800#define UNITY_TEST_ASSERT_EQUAL_INT(expected, actual, line, message) \
801 UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), \
802 (message), (UNITY_LINE_TYPE)(line), \
803 UNITY_DISPLAY_STYLE_INT)
804#define UNITY_TEST_ASSERT_EQUAL_INT8(expected, actual, line, message) \
805 UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8)(expected), \
806 (UNITY_INT)(UNITY_INT8)(actual), (message), \
807 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
808#define UNITY_TEST_ASSERT_EQUAL_INT16(expected, actual, line, message) \
809 UnityAssertEqualNumber((UNITY_INT)(UNITY_INT16)(expected), \
810 (UNITY_INT)(UNITY_INT16)(actual), (message), \
811 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
812#define UNITY_TEST_ASSERT_EQUAL_INT32(expected, actual, line, message) \
813 UnityAssertEqualNumber((UNITY_INT)(UNITY_INT32)(expected), \
814 (UNITY_INT)(UNITY_INT32)(actual), (message), \
815 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
816#define UNITY_TEST_ASSERT_EQUAL_UINT(expected, actual, line, message) \
817 UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), \
818 (message), (UNITY_LINE_TYPE)(line), \
819 UNITY_DISPLAY_STYLE_UINT)
820#define UNITY_TEST_ASSERT_EQUAL_UINT8(expected, actual, line, message) \
821 UnityAssertEqualNumber((UNITY_INT)(UNITY_UINT8)(expected), \
822 (UNITY_INT)(UNITY_UINT8)(actual), (message), \
823 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
824#define UNITY_TEST_ASSERT_EQUAL_UINT16(expected, actual, line, message) \
825 UnityAssertEqualNumber((UNITY_INT)(UNITY_UINT16)(expected), \
826 (UNITY_INT)(UNITY_UINT16)(actual), (message), \
827 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
828#define UNITY_TEST_ASSERT_EQUAL_UINT32(expected, actual, line, message) \
829 UnityAssertEqualNumber((UNITY_INT)(UNITY_UINT32)(expected), \
830 (UNITY_INT)(UNITY_UINT32)(actual), (message), \
831 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
832#define UNITY_TEST_ASSERT_EQUAL_HEX8(expected, actual, line, message) \
833 UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8)(expected), \
834 (UNITY_INT)(UNITY_INT8)(actual), (message), \
835 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
836#define UNITY_TEST_ASSERT_EQUAL_HEX16(expected, actual, line, message) \
837 UnityAssertEqualNumber((UNITY_INT)(UNITY_INT16)(expected), \
838 (UNITY_INT)(UNITY_INT16)(actual), (message), \
839 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
840#define UNITY_TEST_ASSERT_EQUAL_HEX32(expected, actual, line, message) \
841 UnityAssertEqualNumber((UNITY_INT)(UNITY_INT32)(expected), \
842 (UNITY_INT)(UNITY_INT32)(actual), (message), \
843 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
844#define UNITY_TEST_ASSERT_EQUAL_CHAR(expected, actual, line, message) \
845 UnityAssertEqualNumber((UNITY_INT)(UNITY_INT8)(expected), \
846 (UNITY_INT)(UNITY_INT8)(actual), (message), \
847 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
848#define UNITY_TEST_ASSERT_BITS(mask, expected, actual, line, message) \
849 UnityAssertBits((UNITY_INT)(mask), (UNITY_INT)(expected), \
850 (UNITY_INT)(actual), (message), (UNITY_LINE_TYPE)(line))
852#define UNITY_TEST_ASSERT_NOT_EQUAL_INT(threshold, actual, line, message) \
853 UnityAssertGreaterOrLessOrEqualNumber( \
854 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), \
855 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
856#define UNITY_TEST_ASSERT_NOT_EQUAL_INT8(threshold, actual, line, message) \
857 UnityAssertGreaterOrLessOrEqualNumber( \
858 (UNITY_INT)(UNITY_INT8)(threshold), (UNITY_INT)(UNITY_INT8)(actual), \
859 UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
860 UNITY_DISPLAY_STYLE_INT8)
861#define UNITY_TEST_ASSERT_NOT_EQUAL_INT16(threshold, actual, line, message) \
862 UnityAssertGreaterOrLessOrEqualNumber( \
863 (UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), \
864 UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
865 UNITY_DISPLAY_STYLE_INT16)
866#define UNITY_TEST_ASSERT_NOT_EQUAL_INT32(threshold, actual, line, message) \
867 UnityAssertGreaterOrLessOrEqualNumber( \
868 (UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), \
869 UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
870 UNITY_DISPLAY_STYLE_INT32)
871#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT(threshold, actual, line, message) \
872 UnityAssertGreaterOrLessOrEqualNumber( \
873 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), \
874 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
875#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT8(threshold, actual, line, message) \
876 UnityAssertGreaterOrLessOrEqualNumber( \
877 (UNITY_INT)(UNITY_UINT8)(threshold), (UNITY_INT)(UNITY_UINT8)(actual), \
878 UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
879 UNITY_DISPLAY_STYLE_UINT8)
880#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT16(threshold, actual, line, message) \
881 UnityAssertGreaterOrLessOrEqualNumber( \
882 (UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), \
883 UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
884 UNITY_DISPLAY_STYLE_UINT16)
885#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT32(threshold, actual, line, message) \
886 UnityAssertGreaterOrLessOrEqualNumber( \
887 (UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), \
888 UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
889 UNITY_DISPLAY_STYLE_UINT32)
890#define UNITY_TEST_ASSERT_NOT_EQUAL_HEX8(threshold, actual, line, message) \
891 UnityAssertGreaterOrLessOrEqualNumber( \
892 (UNITY_INT)(UNITY_UINT8)(threshold), (UNITY_INT)(UNITY_UINT8)(actual), \
893 UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
894 UNITY_DISPLAY_STYLE_HEX8)
895#define UNITY_TEST_ASSERT_NOT_EQUAL_HEX16(threshold, actual, line, message) \
896 UnityAssertGreaterOrLessOrEqualNumber( \
897 (UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), \
898 UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
899 UNITY_DISPLAY_STYLE_HEX16)
900#define UNITY_TEST_ASSERT_NOT_EQUAL_HEX32(threshold, actual, line, message) \
901 UnityAssertGreaterOrLessOrEqualNumber( \
902 (UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), \
903 UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
904 UNITY_DISPLAY_STYLE_HEX32)
905#define UNITY_TEST_ASSERT_NOT_EQUAL_CHAR(threshold, actual, line, message) \
906 UnityAssertGreaterOrLessOrEqualNumber( \
907 (UNITY_INT)(UNITY_INT8)(threshold), (UNITY_INT)(UNITY_INT8)(actual), \
908 UNITY_NOT_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
909 UNITY_DISPLAY_STYLE_CHAR)
911#define UNITY_TEST_ASSERT_GREATER_THAN_INT(threshold, actual, line, message) \
912 UnityAssertGreaterOrLessOrEqualNumber( \
913 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, \
914 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
915#define UNITY_TEST_ASSERT_GREATER_THAN_INT8(threshold, actual, line, message) \
916 UnityAssertGreaterOrLessOrEqualNumber( \
917 (UNITY_INT)(UNITY_INT8)(threshold), (UNITY_INT)(UNITY_INT8)(actual), \
918 UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), \
919 UNITY_DISPLAY_STYLE_INT8)
920#define UNITY_TEST_ASSERT_GREATER_THAN_INT16(threshold, actual, line, message) \
921 UnityAssertGreaterOrLessOrEqualNumber( \
922 (UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), \
923 UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), \
924 UNITY_DISPLAY_STYLE_INT16)
925#define UNITY_TEST_ASSERT_GREATER_THAN_INT32(threshold, actual, line, message) \
926 UnityAssertGreaterOrLessOrEqualNumber( \
927 (UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), \
928 UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), \
929 UNITY_DISPLAY_STYLE_INT32)
930#define UNITY_TEST_ASSERT_GREATER_THAN_UINT(threshold, actual, line, message) \
931 UnityAssertGreaterOrLessOrEqualNumber( \
932 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, \
933 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
934#define UNITY_TEST_ASSERT_GREATER_THAN_UINT8(threshold, actual, line, message) \
935 UnityAssertGreaterOrLessOrEqualNumber( \
936 (UNITY_INT)(UNITY_UINT8)(threshold), (UNITY_INT)(UNITY_UINT8)(actual), \
937 UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), \
938 UNITY_DISPLAY_STYLE_UINT8)
939#define UNITY_TEST_ASSERT_GREATER_THAN_UINT16(threshold, actual, line, \
941 UnityAssertGreaterOrLessOrEqualNumber( \
942 (UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), \
943 UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), \
944 UNITY_DISPLAY_STYLE_UINT16)
945#define UNITY_TEST_ASSERT_GREATER_THAN_UINT32(threshold, actual, line, \
947 UnityAssertGreaterOrLessOrEqualNumber( \
948 (UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), \
949 UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), \
950 UNITY_DISPLAY_STYLE_UINT32)
951#define UNITY_TEST_ASSERT_GREATER_THAN_HEX8(threshold, actual, line, message) \
952 UnityAssertGreaterOrLessOrEqualNumber( \
953 (UNITY_INT)(UNITY_UINT8)(threshold), (UNITY_INT)(UNITY_UINT8)(actual), \
954 UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), \
955 UNITY_DISPLAY_STYLE_HEX8)
956#define UNITY_TEST_ASSERT_GREATER_THAN_HEX16(threshold, actual, line, message) \
957 UnityAssertGreaterOrLessOrEqualNumber( \
958 (UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), \
959 UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), \
960 UNITY_DISPLAY_STYLE_HEX16)
961#define UNITY_TEST_ASSERT_GREATER_THAN_HEX32(threshold, actual, line, message) \
962 UnityAssertGreaterOrLessOrEqualNumber( \
963 (UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), \
964 UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), \
965 UNITY_DISPLAY_STYLE_HEX32)
966#define UNITY_TEST_ASSERT_GREATER_THAN_CHAR(threshold, actual, line, message) \
967 UnityAssertGreaterOrLessOrEqualNumber( \
968 (UNITY_INT)(UNITY_INT8)(threshold), (UNITY_INT)(UNITY_INT8)(actual), \
969 UNITY_GREATER_THAN, (message), (UNITY_LINE_TYPE)(line), \
970 UNITY_DISPLAY_STYLE_CHAR)
972#define UNITY_TEST_ASSERT_SMALLER_THAN_INT(threshold, actual, line, message) \
973 UnityAssertGreaterOrLessOrEqualNumber( \
974 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, \
975 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
976#define UNITY_TEST_ASSERT_SMALLER_THAN_INT8(threshold, actual, line, message) \
977 UnityAssertGreaterOrLessOrEqualNumber( \
978 (UNITY_INT)(UNITY_INT8)(threshold), (UNITY_INT)(UNITY_INT8)(actual), \
979 UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), \
980 UNITY_DISPLAY_STYLE_INT8)
981#define UNITY_TEST_ASSERT_SMALLER_THAN_INT16(threshold, actual, line, message) \
982 UnityAssertGreaterOrLessOrEqualNumber( \
983 (UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), \
984 UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), \
985 UNITY_DISPLAY_STYLE_INT16)
986#define UNITY_TEST_ASSERT_SMALLER_THAN_INT32(threshold, actual, line, message) \
987 UnityAssertGreaterOrLessOrEqualNumber( \
988 (UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), \
989 UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), \
990 UNITY_DISPLAY_STYLE_INT32)
991#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT(threshold, actual, line, message) \
992 UnityAssertGreaterOrLessOrEqualNumber( \
993 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, \
994 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
995#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT8(threshold, actual, line, message) \
996 UnityAssertGreaterOrLessOrEqualNumber( \
997 (UNITY_INT)(UNITY_UINT8)(threshold), (UNITY_INT)(UNITY_UINT8)(actual), \
998 UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), \
999 UNITY_DISPLAY_STYLE_UINT8)
1000#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT16(threshold, actual, line, \
1002 UnityAssertGreaterOrLessOrEqualNumber( \
1003 (UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), \
1004 UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), \
1005 UNITY_DISPLAY_STYLE_UINT16)
1006#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT32(threshold, actual, line, \
1008 UnityAssertGreaterOrLessOrEqualNumber( \
1009 (UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), \
1010 UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), \
1011 UNITY_DISPLAY_STYLE_UINT32)
1012#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX8(threshold, actual, line, message) \
1013 UnityAssertGreaterOrLessOrEqualNumber( \
1014 (UNITY_INT)(UNITY_UINT8)(threshold), (UNITY_INT)(UNITY_UINT8)(actual), \
1015 UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), \
1016 UNITY_DISPLAY_STYLE_HEX8)
1017#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX16(threshold, actual, line, message) \
1018 UnityAssertGreaterOrLessOrEqualNumber( \
1019 (UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), \
1020 UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), \
1021 UNITY_DISPLAY_STYLE_HEX16)
1022#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX32(threshold, actual, line, message) \
1023 UnityAssertGreaterOrLessOrEqualNumber( \
1024 (UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), \
1025 UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), \
1026 UNITY_DISPLAY_STYLE_HEX32)
1027#define UNITY_TEST_ASSERT_SMALLER_THAN_CHAR(threshold, actual, line, message) \
1028 UnityAssertGreaterOrLessOrEqualNumber( \
1029 (UNITY_INT)(UNITY_INT8)(threshold), (UNITY_INT)(UNITY_INT8)(actual), \
1030 UNITY_SMALLER_THAN, (message), (UNITY_LINE_TYPE)(line), \
1031 UNITY_DISPLAY_STYLE_CHAR)
1033#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT(threshold, actual, line, \
1035 UnityAssertGreaterOrLessOrEqualNumber( \
1036 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_OR_EQUAL, \
1037 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
1038#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT8(threshold, actual, line, \
1040 UnityAssertGreaterOrLessOrEqualNumber( \
1041 (UNITY_INT)(UNITY_INT8)(threshold), (UNITY_INT)(UNITY_INT8)(actual), \
1042 UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1043 UNITY_DISPLAY_STYLE_INT8)
1044#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT16(threshold, actual, line, \
1046 UnityAssertGreaterOrLessOrEqualNumber( \
1047 (UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), \
1048 UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1049 UNITY_DISPLAY_STYLE_INT16)
1050#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT32(threshold, actual, line, \
1052 UnityAssertGreaterOrLessOrEqualNumber( \
1053 (UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), \
1054 UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1055 UNITY_DISPLAY_STYLE_INT32)
1056#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT(threshold, actual, line, \
1058 UnityAssertGreaterOrLessOrEqualNumber( \
1059 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_OR_EQUAL, \
1060 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
1061#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT8(threshold, actual, line, \
1063 UnityAssertGreaterOrLessOrEqualNumber( \
1064 (UNITY_INT)(UNITY_UINT8)(threshold), (UNITY_INT)(UNITY_UINT8)(actual), \
1065 UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1066 UNITY_DISPLAY_STYLE_UINT8)
1067#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT16(threshold, actual, line, \
1069 UnityAssertGreaterOrLessOrEqualNumber( \
1070 (UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), \
1071 UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1072 UNITY_DISPLAY_STYLE_UINT16)
1073#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT32(threshold, actual, line, \
1075 UnityAssertGreaterOrLessOrEqualNumber( \
1076 (UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), \
1077 UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1078 UNITY_DISPLAY_STYLE_UINT32)
1079#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX8(threshold, actual, line, \
1081 UnityAssertGreaterOrLessOrEqualNumber( \
1082 (UNITY_INT)(UNITY_UINT8)(threshold), (UNITY_INT)(UNITY_UINT8)(actual), \
1083 UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1084 UNITY_DISPLAY_STYLE_HEX8)
1085#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX16(threshold, actual, line, \
1087 UnityAssertGreaterOrLessOrEqualNumber( \
1088 (UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), \
1089 UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1090 UNITY_DISPLAY_STYLE_HEX16)
1091#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX32(threshold, actual, line, \
1093 UnityAssertGreaterOrLessOrEqualNumber( \
1094 (UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), \
1095 UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1096 UNITY_DISPLAY_STYLE_HEX32)
1097#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_CHAR(threshold, actual, line, \
1099 UnityAssertGreaterOrLessOrEqualNumber( \
1100 (UNITY_INT)(UNITY_INT8)(threshold), (UNITY_INT)(UNITY_INT8)(actual), \
1101 UNITY_GREATER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1102 UNITY_DISPLAY_STYLE_CHAR)
1104#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT(threshold, actual, line, \
1106 UnityAssertGreaterOrLessOrEqualNumber( \
1107 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_OR_EQUAL, \
1108 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
1109#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT8(threshold, actual, line, \
1111 UnityAssertGreaterOrLessOrEqualNumber( \
1112 (UNITY_INT)(UNITY_INT8)(threshold), (UNITY_INT)(UNITY_INT8)(actual), \
1113 UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1114 UNITY_DISPLAY_STYLE_INT8)
1115#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT16(threshold, actual, line, \
1117 UnityAssertGreaterOrLessOrEqualNumber( \
1118 (UNITY_INT)(UNITY_INT16)(threshold), (UNITY_INT)(UNITY_INT16)(actual), \
1119 UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1120 UNITY_DISPLAY_STYLE_INT16)
1121#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT32(threshold, actual, line, \
1123 UnityAssertGreaterOrLessOrEqualNumber( \
1124 (UNITY_INT)(UNITY_INT32)(threshold), (UNITY_INT)(UNITY_INT32)(actual), \
1125 UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1126 UNITY_DISPLAY_STYLE_INT32)
1127#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT(threshold, actual, line, \
1129 UnityAssertGreaterOrLessOrEqualNumber( \
1130 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_OR_EQUAL, \
1131 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
1132#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT8(threshold, actual, line, \
1134 UnityAssertGreaterOrLessOrEqualNumber( \
1135 (UNITY_INT)(UNITY_UINT8)(threshold), (UNITY_INT)(UNITY_UINT8)(actual), \
1136 UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1137 UNITY_DISPLAY_STYLE_UINT8)
1138#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT16(threshold, actual, line, \
1140 UnityAssertGreaterOrLessOrEqualNumber( \
1141 (UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), \
1142 UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1143 UNITY_DISPLAY_STYLE_UINT16)
1144#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT32(threshold, actual, line, \
1146 UnityAssertGreaterOrLessOrEqualNumber( \
1147 (UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), \
1148 UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1149 UNITY_DISPLAY_STYLE_UINT32)
1150#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX8(threshold, actual, line, \
1152 UnityAssertGreaterOrLessOrEqualNumber( \
1153 (UNITY_INT)(UNITY_UINT8)(threshold), (UNITY_INT)(UNITY_UINT8)(actual), \
1154 UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1155 UNITY_DISPLAY_STYLE_HEX8)
1156#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX16(threshold, actual, line, \
1158 UnityAssertGreaterOrLessOrEqualNumber( \
1159 (UNITY_INT)(UNITY_UINT16)(threshold), (UNITY_INT)(UNITY_UINT16)(actual), \
1160 UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1161 UNITY_DISPLAY_STYLE_HEX16)
1162#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX32(threshold, actual, line, \
1164 UnityAssertGreaterOrLessOrEqualNumber( \
1165 (UNITY_INT)(UNITY_UINT32)(threshold), (UNITY_INT)(UNITY_UINT32)(actual), \
1166 UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1167 UNITY_DISPLAY_STYLE_HEX32)
1168#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_CHAR(threshold, actual, line, \
1170 UnityAssertGreaterOrLessOrEqualNumber( \
1171 (UNITY_INT)(UNITY_INT8)(threshold), (UNITY_INT)(UNITY_INT8)(actual), \
1172 UNITY_SMALLER_OR_EQUAL, (message), (UNITY_LINE_TYPE)(line), \
1173 UNITY_DISPLAY_STYLE_CHAR)
1175#define UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, line, message) \
1176 UnityAssertNumbersWithin((delta), (UNITY_INT)(expected), \
1177 (UNITY_INT)(actual), (message), \
1178 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT)
1179#define UNITY_TEST_ASSERT_INT8_WITHIN(delta, expected, actual, line, message) \
1180 UnityAssertNumbersWithin((UNITY_UINT8)(delta), \
1181 (UNITY_INT)(UNITY_INT8)(expected), \
1182 (UNITY_INT)(UNITY_INT8)(actual), (message), \
1183 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8)
1184#define UNITY_TEST_ASSERT_INT16_WITHIN(delta, expected, actual, line, message) \
1185 UnityAssertNumbersWithin((UNITY_UINT16)(delta), \
1186 (UNITY_INT)(UNITY_INT16)(expected), \
1187 (UNITY_INT)(UNITY_INT16)(actual), (message), \
1188 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16)
1189#define UNITY_TEST_ASSERT_INT32_WITHIN(delta, expected, actual, line, message) \
1190 UnityAssertNumbersWithin((UNITY_UINT32)(delta), \
1191 (UNITY_INT)(UNITY_INT32)(expected), \
1192 (UNITY_INT)(UNITY_INT32)(actual), (message), \
1193 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32)
1194#define UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, line, message) \
1195 UnityAssertNumbersWithin((delta), (UNITY_INT)(expected), \
1196 (UNITY_INT)(actual), (message), \
1197 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT)
1198#define UNITY_TEST_ASSERT_UINT8_WITHIN(delta, expected, actual, line, message) \
1199 UnityAssertNumbersWithin( \
1200 (UNITY_UINT8)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT8)(expected), \
1201 (UNITY_INT)(UNITY_UINT)(UNITY_UINT8)(actual), (message), \
1202 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8)
1203#define UNITY_TEST_ASSERT_UINT16_WITHIN(delta, expected, actual, line, \
1205 UnityAssertNumbersWithin( \
1206 (UNITY_UINT16)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(expected), \
1207 (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(actual), (message), \
1208 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16)
1209#define UNITY_TEST_ASSERT_UINT32_WITHIN(delta, expected, actual, line, \
1211 UnityAssertNumbersWithin( \
1212 (UNITY_UINT32)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(expected), \
1213 (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(actual), (message), \
1214 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32)
1215#define UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, line, message) \
1216 UnityAssertNumbersWithin( \
1217 (UNITY_UINT8)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT8)(expected), \
1218 (UNITY_INT)(UNITY_UINT)(UNITY_UINT8)(actual), (message), \
1219 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8)
1220#define UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, line, message) \
1221 UnityAssertNumbersWithin( \
1222 (UNITY_UINT16)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(expected), \
1223 (UNITY_INT)(UNITY_UINT)(UNITY_UINT16)(actual), (message), \
1224 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16)
1225#define UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, line, message) \
1226 UnityAssertNumbersWithin( \
1227 (UNITY_UINT32)(delta), (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(expected), \
1228 (UNITY_INT)(UNITY_UINT)(UNITY_UINT32)(actual), (message), \
1229 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32)
1230#define UNITY_TEST_ASSERT_CHAR_WITHIN(delta, expected, actual, line, message) \
1231 UnityAssertNumbersWithin((UNITY_UINT8)(delta), \
1232 (UNITY_INT)(UNITY_INT8)(expected), \
1233 (UNITY_INT)(UNITY_INT8)(actual), (message), \
1234 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR)
1236#define UNITY_TEST_ASSERT_INT_ARRAY_WITHIN(delta, expected, actual, \
1237 num_elements, line, message) \
1238 UnityAssertNumbersArrayWithin( \
1239 (delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1240 ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), \
1241 UNITY_DISPLAY_STYLE_INT, UNITY_ARRAY_TO_ARRAY)
1242#define UNITY_TEST_ASSERT_INT8_ARRAY_WITHIN(delta, expected, actual, \
1243 num_elements, line, message) \
1244 UnityAssertNumbersArrayWithin( \
1245 (UNITY_UINT8)(delta), (UNITY_INTERNAL_PTR)(expected), \
1246 (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), \
1247 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8, UNITY_ARRAY_TO_ARRAY)
1248#define UNITY_TEST_ASSERT_INT16_ARRAY_WITHIN(delta, expected, actual, \
1249 num_elements, line, message) \
1250 UnityAssertNumbersArrayWithin( \
1251 (UNITY_UINT16)(delta), (UNITY_INTERNAL_PTR)(expected), \
1252 (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), \
1253 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16, \
1254 UNITY_ARRAY_TO_ARRAY)
1255#define UNITY_TEST_ASSERT_INT32_ARRAY_WITHIN(delta, expected, actual, \
1256 num_elements, line, message) \
1257 UnityAssertNumbersArrayWithin( \
1258 (UNITY_UINT32)(delta), (UNITY_INTERNAL_PTR)(expected), \
1259 (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), \
1260 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32, \
1261 UNITY_ARRAY_TO_ARRAY)
1262#define UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN(delta, expected, actual, \
1263 num_elements, line, message) \
1264 UnityAssertNumbersArrayWithin( \
1265 (delta), (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1266 ((UNITY_UINT32)(num_elements)), (message), (UNITY_LINE_TYPE)(line), \
1267 UNITY_DISPLAY_STYLE_UINT, UNITY_ARRAY_TO_ARRAY)
1268#define UNITY_TEST_ASSERT_UINT8_ARRAY_WITHIN(delta, expected, actual, \
1269 num_elements, line, message) \
1270 UnityAssertNumbersArrayWithin( \
1271 (UNITY_UINT16)(delta), (UNITY_INTERNAL_PTR)(expected), \
1272 (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), \
1273 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8, \
1274 UNITY_ARRAY_TO_ARRAY)
1275#define UNITY_TEST_ASSERT_UINT16_ARRAY_WITHIN(delta, expected, actual, \
1276 num_elements, line, message) \
1277 UnityAssertNumbersArrayWithin( \
1278 (UNITY_UINT16)(delta), (UNITY_INTERNAL_PTR)(expected), \
1279 (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), \
1280 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16, \
1281 UNITY_ARRAY_TO_ARRAY)
1282#define UNITY_TEST_ASSERT_UINT32_ARRAY_WITHIN(delta, expected, actual, \
1283 num_elements, line, message) \
1284 UnityAssertNumbersArrayWithin( \
1285 (UNITY_UINT32)(delta), (UNITY_INTERNAL_PTR)(expected), \
1286 (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), \
1287 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32, \
1288 UNITY_ARRAY_TO_ARRAY)
1289#define UNITY_TEST_ASSERT_HEX8_ARRAY_WITHIN(delta, expected, actual, \
1290 num_elements, line, message) \
1291 UnityAssertNumbersArrayWithin( \
1292 (UNITY_UINT8)(delta), (UNITY_INTERNAL_PTR)(expected), \
1293 (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), \
1294 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8, UNITY_ARRAY_TO_ARRAY)
1295#define UNITY_TEST_ASSERT_HEX16_ARRAY_WITHIN(delta, expected, actual, \
1296 num_elements, line, message) \
1297 UnityAssertNumbersArrayWithin( \
1298 (UNITY_UINT16)(delta), (UNITY_INTERNAL_PTR)(expected), \
1299 (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), \
1300 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16, \
1301 UNITY_ARRAY_TO_ARRAY)
1302#define UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN(delta, expected, actual, \
1303 num_elements, line, message) \
1304 UnityAssertNumbersArrayWithin( \
1305 (UNITY_UINT32)(delta), (UNITY_INTERNAL_PTR)(expected), \
1306 (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), \
1307 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32, \
1308 UNITY_ARRAY_TO_ARRAY)
1309#define UNITY_TEST_ASSERT_CHAR_ARRAY_WITHIN(delta, expected, actual, \
1310 num_elements, line, message) \
1311 UnityAssertNumbersArrayWithin( \
1312 (UNITY_UINT8)(delta), (UNITY_INTERNAL_PTR)(expected), \
1313 (UNITY_INTERNAL_PTR)(actual), ((UNITY_UINT32)(num_elements)), (message), \
1314 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR, UNITY_ARRAY_TO_ARRAY)
1316#define UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, line, message) \
1317 UnityAssertEqualNumber((UNITY_PTR_TO_INT)(expected), \
1318 (UNITY_PTR_TO_INT)(actual), (message), \
1319 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER)
1320#define UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, line, message) \
1321 UnityAssertEqualString((const char *)(expected), (const char *)(actual), \
1322 (message), (UNITY_LINE_TYPE)(line))
1323#define UNITY_TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len, line, \
1325 UnityAssertEqualStringLen((const char *)(expected), (const char *)(actual), \
1326 (UNITY_UINT32)(len), (message), \
1327 (UNITY_LINE_TYPE)(line))
1328#define UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, line, message) \
1329 UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), \
1330 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), 1, \
1331 (message), (UNITY_LINE_TYPE)(line), \
1332 UNITY_ARRAY_TO_ARRAY)
1334#define UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements, \
1336 UnityAssertEqualIntArray( \
1337 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1338 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1339 UNITY_DISPLAY_STYLE_INT, UNITY_ARRAY_TO_ARRAY)
1340#define UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements, \
1342 UnityAssertEqualIntArray( \
1343 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1344 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1345 UNITY_DISPLAY_STYLE_INT8, UNITY_ARRAY_TO_ARRAY)
1346#define UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements, \
1348 UnityAssertEqualIntArray( \
1349 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1350 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1351 UNITY_DISPLAY_STYLE_INT16, UNITY_ARRAY_TO_ARRAY)
1352#define UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements, \
1354 UnityAssertEqualIntArray( \
1355 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1356 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1357 UNITY_DISPLAY_STYLE_INT32, UNITY_ARRAY_TO_ARRAY)
1358#define UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements, \
1360 UnityAssertEqualIntArray( \
1361 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1362 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1363 UNITY_DISPLAY_STYLE_UINT, UNITY_ARRAY_TO_ARRAY)
1364#define UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements, \
1366 UnityAssertEqualIntArray( \
1367 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1368 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1369 UNITY_DISPLAY_STYLE_UINT8, UNITY_ARRAY_TO_ARRAY)
1370#define UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements, \
1372 UnityAssertEqualIntArray( \
1373 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1374 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1375 UNITY_DISPLAY_STYLE_UINT16, UNITY_ARRAY_TO_ARRAY)
1376#define UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements, \
1378 UnityAssertEqualIntArray( \
1379 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1380 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1381 UNITY_DISPLAY_STYLE_UINT32, UNITY_ARRAY_TO_ARRAY)
1382#define UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, \
1384 UnityAssertEqualIntArray( \
1385 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1386 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1387 UNITY_DISPLAY_STYLE_HEX8, UNITY_ARRAY_TO_ARRAY)
1388#define UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, \
1390 UnityAssertEqualIntArray( \
1391 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1392 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1393 UNITY_DISPLAY_STYLE_HEX16, UNITY_ARRAY_TO_ARRAY)
1394#define UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, \
1396 UnityAssertEqualIntArray( \
1397 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1398 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1399 UNITY_DISPLAY_STYLE_HEX32, UNITY_ARRAY_TO_ARRAY)
1400#define UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, \
1402 UnityAssertEqualIntArray( \
1403 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1404 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1405 UNITY_DISPLAY_STYLE_POINTER, UNITY_ARRAY_TO_ARRAY)
1406#define UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, \
1408 UnityAssertEqualStringArray((UNITY_INTERNAL_PTR)(expected), \
1409 (const char **)(actual), \
1410 (UNITY_UINT32)(num_elements), (message), \
1411 (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
1412#define UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, \
1413 num_elements, line, message) \
1414 UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), \
1415 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), \
1416 (UNITY_UINT32)(num_elements), (message), \
1417 (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
1418#define UNITY_TEST_ASSERT_EQUAL_CHAR_ARRAY(expected, actual, num_elements, \
1420 UnityAssertEqualIntArray( \
1421 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1422 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1423 UNITY_DISPLAY_STYLE_CHAR, UNITY_ARRAY_TO_ARRAY)
1425#define UNITY_TEST_ASSERT_EACH_EQUAL_INT(expected, actual, num_elements, line, \
1427 UnityAssertEqualIntArray( \
1428 UnityNumToPtr((UNITY_INT)(expected), (UNITY_INT_WIDTH / 8)), \
1429 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1430 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT, UNITY_ARRAY_TO_VAL)
1431#define UNITY_TEST_ASSERT_EACH_EQUAL_INT8(expected, actual, num_elements, \
1433 UnityAssertEqualIntArray( \
1434 UnityNumToPtr((UNITY_INT)(UNITY_INT8)(expected), 1), \
1435 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1436 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT8, UNITY_ARRAY_TO_VAL)
1437#define UNITY_TEST_ASSERT_EACH_EQUAL_INT16(expected, actual, num_elements, \
1439 UnityAssertEqualIntArray( \
1440 UnityNumToPtr((UNITY_INT)(UNITY_INT16)(expected), 2), \
1441 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1442 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT16, UNITY_ARRAY_TO_VAL)
1443#define UNITY_TEST_ASSERT_EACH_EQUAL_INT32(expected, actual, num_elements, \
1445 UnityAssertEqualIntArray( \
1446 UnityNumToPtr((UNITY_INT)(UNITY_INT32)(expected), 4), \
1447 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1448 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT32, UNITY_ARRAY_TO_VAL)
1449#define UNITY_TEST_ASSERT_EACH_EQUAL_UINT(expected, actual, num_elements, \
1451 UnityAssertEqualIntArray( \
1452 UnityNumToPtr((UNITY_INT)(expected), (UNITY_INT_WIDTH / 8)), \
1453 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1454 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT, UNITY_ARRAY_TO_VAL)
1455#define UNITY_TEST_ASSERT_EACH_EQUAL_UINT8(expected, actual, num_elements, \
1457 UnityAssertEqualIntArray( \
1458 UnityNumToPtr((UNITY_INT)(UNITY_UINT8)(expected), 1), \
1459 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1460 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT8, UNITY_ARRAY_TO_VAL)
1461#define UNITY_TEST_ASSERT_EACH_EQUAL_UINT16(expected, actual, num_elements, \
1463 UnityAssertEqualIntArray( \
1464 UnityNumToPtr((UNITY_INT)(UNITY_UINT16)(expected), 2), \
1465 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1466 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT16, UNITY_ARRAY_TO_VAL)
1467#define UNITY_TEST_ASSERT_EACH_EQUAL_UINT32(expected, actual, num_elements, \
1469 UnityAssertEqualIntArray( \
1470 UnityNumToPtr((UNITY_INT)(UNITY_UINT32)(expected), 4), \
1471 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1472 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT32, UNITY_ARRAY_TO_VAL)
1473#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX8(expected, actual, num_elements, \
1475 UnityAssertEqualIntArray( \
1476 UnityNumToPtr((UNITY_INT)(UNITY_INT8)(expected), 1), \
1477 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1478 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX8, UNITY_ARRAY_TO_VAL)
1479#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX16(expected, actual, num_elements, \
1481 UnityAssertEqualIntArray( \
1482 UnityNumToPtr((UNITY_INT)(UNITY_INT16)(expected), 2), \
1483 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1484 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX16, UNITY_ARRAY_TO_VAL)
1485#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX32(expected, actual, num_elements, \
1487 UnityAssertEqualIntArray( \
1488 UnityNumToPtr((UNITY_INT)(UNITY_INT32)(expected), 4), \
1489 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1490 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX32, UNITY_ARRAY_TO_VAL)
1491#define UNITY_TEST_ASSERT_EACH_EQUAL_PTR(expected, actual, num_elements, line, \
1493 UnityAssertEqualIntArray( \
1494 UnityNumToPtr((UNITY_PTR_TO_INT)(expected), (UNITY_POINTER_WIDTH / 8)), \
1495 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1496 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_POINTER, \
1498#define UNITY_TEST_ASSERT_EACH_EQUAL_STRING(expected, actual, num_elements, \
1500 UnityAssertEqualStringArray((UNITY_INTERNAL_PTR)(expected), \
1501 (const char **)(actual), \
1502 (UNITY_UINT32)(num_elements), (message), \
1503 (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL)
1504#define UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY(expected, actual, len, \
1505 num_elements, line, message) \
1506 UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), \
1507 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), \
1508 (UNITY_UINT32)(num_elements), (message), \
1509 (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL)
1510#define UNITY_TEST_ASSERT_EACH_EQUAL_CHAR(expected, actual, num_elements, \
1512 UnityAssertEqualIntArray( \
1513 UnityNumToPtr((UNITY_INT)(UNITY_INT8)(expected), 1), \
1514 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1515 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_CHAR, UNITY_ARRAY_TO_VAL)
1517#ifdef UNITY_SUPPORT_64
1518#define UNITY_TEST_ASSERT_EQUAL_INT64(expected, actual, line, message) \
1519 UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), \
1520 (message), (UNITY_LINE_TYPE)(line), \
1521 UNITY_DISPLAY_STYLE_INT64)
1522#define UNITY_TEST_ASSERT_EQUAL_UINT64(expected, actual, line, message) \
1523 UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), \
1524 (message), (UNITY_LINE_TYPE)(line), \
1525 UNITY_DISPLAY_STYLE_UINT64)
1526#define UNITY_TEST_ASSERT_EQUAL_HEX64(expected, actual, line, message) \
1527 UnityAssertEqualNumber((UNITY_INT)(expected), (UNITY_INT)(actual), \
1528 (message), (UNITY_LINE_TYPE)(line), \
1529 UNITY_DISPLAY_STYLE_HEX64)
1530#define UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, \
1532 UnityAssertEqualIntArray( \
1533 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1534 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1535 UNITY_DISPLAY_STYLE_INT64, UNITY_ARRAY_TO_ARRAY)
1536#define UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, \
1538 UnityAssertEqualIntArray( \
1539 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1540 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1541 UNITY_DISPLAY_STYLE_UINT64, UNITY_ARRAY_TO_ARRAY)
1542#define UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, \
1544 UnityAssertEqualIntArray( \
1545 (UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), \
1546 (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), \
1547 UNITY_DISPLAY_STYLE_HEX64, UNITY_ARRAY_TO_ARRAY)
1548#define UNITY_TEST_ASSERT_EACH_EQUAL_INT64(expected, actual, num_elements, \
1550 UnityAssertEqualIntArray( \
1551 UnityNumToPtr((UNITY_INT)(UNITY_INT64)(expected), 8), \
1552 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1553 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64, UNITY_ARRAY_TO_VAL)
1554#define UNITY_TEST_ASSERT_EACH_EQUAL_UINT64(expected, actual, num_elements, \
1556 UnityAssertEqualIntArray( \
1557 UnityNumToPtr((UNITY_INT)(UNITY_UINT64)(expected), 8), \
1558 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1559 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64, UNITY_ARRAY_TO_VAL)
1560#define UNITY_TEST_ASSERT_EACH_EQUAL_HEX64(expected, actual, num_elements, \
1562 UnityAssertEqualIntArray( \
1563 UnityNumToPtr((UNITY_INT)(UNITY_INT64)(expected), 8), \
1564 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1565 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64, UNITY_ARRAY_TO_VAL)
1566#define UNITY_TEST_ASSERT_INT64_WITHIN(delta, expected, actual, line, message) \
1567 UnityAssertNumbersWithin((delta), (UNITY_INT)(expected), \
1568 (UNITY_INT)(actual), (message), \
1569 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
1570#define UNITY_TEST_ASSERT_UINT64_WITHIN(delta, expected, actual, line, \
1572 UnityAssertNumbersWithin( \
1573 (delta), (UNITY_INT)(expected), (UNITY_INT)(actual), (message), \
1574 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
1575#define UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, line, message) \
1576 UnityAssertNumbersWithin((delta), (UNITY_INT)(expected), \
1577 (UNITY_INT)(actual), (message), \
1578 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
1579#define UNITY_TEST_ASSERT_NOT_EQUAL_INT64(threshold, actual, line, message) \
1580 UnityAssertGreaterOrLessOrEqualNumber( \
1581 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), \
1582 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
1583#define UNITY_TEST_ASSERT_NOT_EQUAL_UINT64(threshold, actual, line, message) \
1584 UnityAssertGreaterOrLessOrEqualNumber( \
1585 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), \
1586 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
1587#define UNITY_TEST_ASSERT_NOT_EQUAL_HEX64(threshold, actual, line, message) \
1588 UnityAssertGreaterOrLessOrEqualNumber( \
1589 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_NOT_EQUAL, (message), \
1590 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
1591#define UNITY_TEST_ASSERT_GREATER_THAN_INT64(threshold, actual, line, message) \
1592 UnityAssertGreaterOrLessOrEqualNumber( \
1593 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, \
1594 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
1595#define UNITY_TEST_ASSERT_GREATER_THAN_UINT64(threshold, actual, line, \
1597 UnityAssertGreaterOrLessOrEqualNumber( \
1598 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, \
1599 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
1600#define UNITY_TEST_ASSERT_GREATER_THAN_HEX64(threshold, actual, line, message) \
1601 UnityAssertGreaterOrLessOrEqualNumber( \
1602 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_THAN, \
1603 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
1604#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT64(threshold, actual, line, \
1606 UnityAssertGreaterOrLessOrEqualNumber( \
1607 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_OR_EQUAL, \
1608 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
1609#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT64(threshold, actual, line, \
1611 UnityAssertGreaterOrLessOrEqualNumber( \
1612 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_OR_EQUAL, \
1613 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
1614#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX64(threshold, actual, line, \
1616 UnityAssertGreaterOrLessOrEqualNumber( \
1617 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_GREATER_OR_EQUAL, \
1618 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
1619#define UNITY_TEST_ASSERT_SMALLER_THAN_INT64(threshold, actual, line, message) \
1620 UnityAssertGreaterOrLessOrEqualNumber( \
1621 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, \
1622 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
1623#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT64(threshold, actual, line, \
1625 UnityAssertGreaterOrLessOrEqualNumber( \
1626 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, \
1627 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
1628#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX64(threshold, actual, line, message) \
1629 UnityAssertGreaterOrLessOrEqualNumber( \
1630 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_THAN, \
1631 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
1632#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT64(threshold, actual, line, \
1634 UnityAssertGreaterOrLessOrEqualNumber( \
1635 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_OR_EQUAL, \
1636 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64)
1637#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT64(threshold, actual, line, \
1639 UnityAssertGreaterOrLessOrEqualNumber( \
1640 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_OR_EQUAL, \
1641 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64)
1642#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX64(threshold, actual, line, \
1644 UnityAssertGreaterOrLessOrEqualNumber( \
1645 (UNITY_INT)(threshold), (UNITY_INT)(actual), UNITY_SMALLER_OR_EQUAL, \
1646 (message), (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64)
1647#define UNITY_TEST_ASSERT_INT64_ARRAY_WITHIN(delta, expected, actual, \
1648 num_elements, line, message) \
1649 UnityAssertNumbersArrayWithin( \
1650 (UNITY_UINT64)(delta), (UNITY_INTERNAL_PTR)(expected), \
1651 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1652 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_INT64, \
1653 UNITY_ARRAY_TO_ARRAY)
1654#define UNITY_TEST_ASSERT_UINT64_ARRAY_WITHIN(delta, expected, actual, \
1655 num_elements, line, message) \
1656 UnityAssertNumbersArrayWithin( \
1657 (UNITY_UINT64)(delta), (UNITY_INTERNAL_PTR)(expected), \
1658 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1659 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_UINT64, \
1660 UNITY_ARRAY_TO_ARRAY)
1661#define UNITY_TEST_ASSERT_HEX64_ARRAY_WITHIN(delta, expected, actual, \
1662 num_elements, line, message) \
1663 UnityAssertNumbersArrayWithin( \
1664 (UNITY_UINT64)(delta), (UNITY_INTERNAL_PTR)(expected), \
1665 (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(num_elements), (message), \
1666 (UNITY_LINE_TYPE)(line), UNITY_DISPLAY_STYLE_HEX64, \
1667 UNITY_ARRAY_TO_ARRAY)
1669#define UNITY_TEST_ASSERT_EQUAL_INT64(expected, actual, line, message) \
1670 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1671#define UNITY_TEST_ASSERT_EQUAL_UINT64(expected, actual, line, message) \
1672 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1673#define UNITY_TEST_ASSERT_EQUAL_HEX64(expected, actual, line, message) \
1674 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1675#define UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, \
1677 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1678#define UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, \
1680 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1681#define UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, \
1683 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1684#define UNITY_TEST_ASSERT_INT64_WITHIN(delta, expected, actual, line, message) \
1685 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1686#define UNITY_TEST_ASSERT_UINT64_WITHIN(delta, expected, actual, line, \
1688 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1689#define UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, line, message) \
1690 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1691#define UNITY_TEST_ASSERT_GREATER_THAN_INT64(threshold, actual, line, message) \
1692 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1693#define UNITY_TEST_ASSERT_GREATER_THAN_UINT64(threshold, actual, line, \
1695 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1696#define UNITY_TEST_ASSERT_GREATER_THAN_HEX64(threshold, actual, line, message) \
1697 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1698#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT64(threshold, actual, line, \
1700 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1701#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT64(threshold, actual, line, \
1703 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1704#define UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX64(threshold, actual, line, \
1706 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1707#define UNITY_TEST_ASSERT_SMALLER_THAN_INT64(threshold, actual, line, message) \
1708 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1709#define UNITY_TEST_ASSERT_SMALLER_THAN_UINT64(threshold, actual, line, \
1711 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1712#define UNITY_TEST_ASSERT_SMALLER_THAN_HEX64(threshold, actual, line, message) \
1713 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1714#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT64(threshold, actual, line, \
1716 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1717#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT64(threshold, actual, line, \
1719 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1720#define UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX64(threshold, actual, line, \
1722 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1723#define UNITY_TEST_ASSERT_INT64_ARRAY_WITHIN(delta, expected, actual, \
1724 num_elements, line, message) \
1725 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1726#define UNITY_TEST_ASSERT_UINT64_ARRAY_WITHIN(delta, expected, actual, \
1727 num_elements, line, message) \
1728 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1729#define UNITY_TEST_ASSERT_HEX64_ARRAY_WITHIN(delta, expected, actual, \
1730 num_elements, line, message) \
1731 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErr64)
1734#ifdef UNITY_EXCLUDE_FLOAT
1735#define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) \
1736 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
1737#define UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, line, message) \
1738 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
1739#define UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, \
1741 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
1742#define UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT(expected, actual, num_elements, \
1744 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
1745#define UNITY_TEST_ASSERT_FLOAT_IS_INF(actual, line, message) \
1746 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
1747#define UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF(actual, line, message) \
1748 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
1749#define UNITY_TEST_ASSERT_FLOAT_IS_NAN(actual, line, message) \
1750 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
1751#define UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE(actual, line, message) \
1752 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
1753#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF(actual, line, message) \
1754 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
1755#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF(actual, line, message) \
1756 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
1757#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN(actual, line, message) \
1758 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
1759#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual, line, message) \
1760 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrFloat)
1762#define UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, line, message) \
1763 UnityAssertFloatsWithin((UNITY_FLOAT)(delta), (UNITY_FLOAT)(expected), \
1764 (UNITY_FLOAT)(actual), (message), \
1765 (UNITY_LINE_TYPE)(line))
1766#define UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, line, message) \
1767 UNITY_TEST_ASSERT_FLOAT_WITHIN( \
1768 (UNITY_FLOAT)(expected) * (UNITY_FLOAT)UNITY_FLOAT_PRECISION, \
1769 (UNITY_FLOAT)(expected), (UNITY_FLOAT)(actual), (UNITY_LINE_TYPE)(line), \
1771#define UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, \
1773 UnityAssertEqualFloatArray((UNITY_FLOAT *)(expected), \
1774 (UNITY_FLOAT *)(actual), \
1775 (UNITY_UINT32)(num_elements), (message), \
1776 (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
1777#define UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT(expected, actual, num_elements, \
1779 UnityAssertEqualFloatArray(UnityFloatToPtr(expected), \
1780 (UNITY_FLOAT *)(actual), \
1781 (UNITY_UINT32)(num_elements), (message), \
1782 (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL)
1783#define UNITY_TEST_ASSERT_FLOAT_IS_INF(actual, line, message) \
1784 UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), \
1785 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_INF)
1786#define UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF(actual, line, message) \
1787 UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), \
1788 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NEG_INF)
1789#define UNITY_TEST_ASSERT_FLOAT_IS_NAN(actual, line, message) \
1790 UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), \
1791 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NAN)
1792#define UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE(actual, line, message) \
1793 UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), \
1794 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_DET)
1795#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF(actual, line, message) \
1796 UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), \
1797 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_INF)
1798#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF(actual, line, message) \
1799 UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), \
1800 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_NEG_INF)
1801#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN(actual, line, message) \
1802 UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), \
1803 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_NAN)
1804#define UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual, line, message) \
1805 UnityAssertFloatSpecial((UNITY_FLOAT)(actual), (message), \
1806 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_DET)
1809#ifdef UNITY_EXCLUDE_DOUBLE
1810#define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, \
1812 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
1813#define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) \
1814 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
1815#define UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, \
1817 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
1818#define UNITY_TEST_ASSERT_EACH_EQUAL_DOUBLE(expected, actual, num_elements, \
1820 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
1821#define UNITY_TEST_ASSERT_DOUBLE_IS_INF(actual, line, message) \
1822 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
1823#define UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF(actual, line, message) \
1824 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
1825#define UNITY_TEST_ASSERT_DOUBLE_IS_NAN(actual, line, message) \
1826 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
1827#define UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE(actual, line, message) \
1828 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
1829#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF(actual, line, message) \
1830 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
1831#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF(actual, line, message) \
1832 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
1833#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual, line, message) \
1834 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
1835#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) \
1836 UNITY_TEST_FAIL((UNITY_LINE_TYPE)(line), UnityStrErrDouble)
1838#define UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, line, \
1840 UnityAssertDoublesWithin((UNITY_DOUBLE)(delta), (UNITY_DOUBLE)(expected), \
1841 (UNITY_DOUBLE)(actual), (message), \
1842 (UNITY_LINE_TYPE)(line))
1843#define UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, line, message) \
1844 UNITY_TEST_ASSERT_DOUBLE_WITHIN( \
1845 (UNITY_DOUBLE)(expected) * (UNITY_DOUBLE)UNITY_DOUBLE_PRECISION, \
1846 (UNITY_DOUBLE)(expected), (UNITY_DOUBLE)(actual), \
1847 (UNITY_LINE_TYPE)(line), (message))
1848#define UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, \
1850 UnityAssertEqualDoubleArray((UNITY_DOUBLE *)(expected), \
1851 (UNITY_DOUBLE *)(actual), \
1852 (UNITY_UINT32)(num_elements), (message), \
1853 (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
1854#define UNITY_TEST_ASSERT_EACH_EQUAL_DOUBLE(expected, actual, num_elements, \
1856 UnityAssertEqualDoubleArray(UnityDoubleToPtr(expected), \
1857 (UNITY_DOUBLE *)(actual), \
1858 (UNITY_UINT32)(num_elements), (message), \
1859 (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_VAL)
1860#define UNITY_TEST_ASSERT_DOUBLE_IS_INF(actual, line, message) \
1861 UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), \
1862 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_INF)
1863#define UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF(actual, line, message) \
1864 UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), \
1865 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NEG_INF)
1866#define UNITY_TEST_ASSERT_DOUBLE_IS_NAN(actual, line, message) \
1867 UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), \
1868 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NAN)
1869#define UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE(actual, line, message) \
1870 UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), \
1871 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_DET)
1872#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF(actual, line, message) \
1873 UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), \
1874 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_INF)
1875#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF(actual, line, message) \
1876 UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), \
1877 (UNITY_LINE_TYPE)(line), \
1878 UNITY_FLOAT_IS_NOT_NEG_INF)
1879#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual, line, message) \
1880 UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), \
1881 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_NAN)
1882#define UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual, line, message) \
1883 UnityAssertDoubleSpecial((UNITY_DOUBLE)(actual), (message), \
1884 (UNITY_LINE_TYPE)(line), UNITY_FLOAT_IS_NOT_DET)