ASCII Serial Com
Serial communication library between computers, microcontrollers, FPGAs, etc. Uses only ASCII. Not the most efficient protocol, but meant to be easy to read
Loading...
Searching...
No Matches
unity.h
1/* ==========================================
2 Unity Project - A Test Framework for C
3 Copyright (c) 2007-19 Mike Karlesky, Mark VanderVoord, Greg Williams
4 [Released under MIT License. Please refer to license.txt for details]
5========================================== */
6
7#ifndef UNITY_FRAMEWORK_H
8#define UNITY_FRAMEWORK_H
9#define UNITY
10
11#define UNITY_VERSION_MAJOR 2
12#define UNITY_VERSION_MINOR 5
13#define UNITY_VERSION_BUILD 1
14#define UNITY_VERSION \
15 ((UNITY_VERSION_MAJOR << 16) | (UNITY_VERSION_MINOR << 8) | \
16 UNITY_VERSION_BUILD)
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#include "unity_internals.h"
23
24/*-------------------------------------------------------
25 * Test Setup / Teardown
26 *-------------------------------------------------------*/
27
28/* These functions are intended to be called before and after each test.
29 * If using unity directly, these will need to be provided for each test
30 * executable built. If you are using the test runner generator and/or
31 * Ceedling, these are optional. */
32void setUp(void);
33void tearDown(void);
34
35/* These functions are intended to be called at the beginning and end of an
36 * entire test suite. suiteTearDown() is passed the number of tests that
37 * failed, and its return value becomes the exit code of main(). If using
38 * Unity directly, you're in charge of calling these if they are desired.
39 * If using Ceedling or the test runner generator, these will be called
40 * automatically if they exist. */
41void suiteSetUp(void);
42int suiteTearDown(int num_failures);
43
44/*-------------------------------------------------------
45 * Test Reset and Verify
46 *-------------------------------------------------------*/
47
48/* These functions are intended to be called before during tests in order
49 * to support complex test loops, etc. Both are NOT built into Unity. Instead
50 * the test runner generator will create them. resetTest will run teardown and
51 * setup again, verifying any end-of-test needs between. verifyTest will only
52 * run the verification. */
53void resetTest(void);
54void verifyTest(void);
55
56/*-------------------------------------------------------
57 * Configuration Options
58 *-------------------------------------------------------
59 * All options described below should be passed as a compiler flag to all files
60 using Unity. If you must add #defines, place them BEFORE the #include above.
61
62 * Integers/longs/pointers
63 * - Unity attempts to automatically discover your integer sizes
64 * - define UNITY_EXCLUDE_STDINT_H to stop attempting to look in
65 <stdint.h>
66 * - define UNITY_EXCLUDE_LIMITS_H to stop attempting to look in
67 <limits.h>
68 * - If you cannot use the automatic methods above, you can force Unity by
69 using these options:
70 * - define UNITY_SUPPORT_64
71 * - set UNITY_INT_WIDTH
72 * - set UNITY_LONG_WIDTH
73 * - set UNITY_POINTER_WIDTH
74
75 * Floats
76 * - define UNITY_EXCLUDE_FLOAT to disallow floating point comparisons
77 * - define UNITY_FLOAT_PRECISION to specify the precision to use when doing
78 TEST_ASSERT_EQUAL_FLOAT
79 * - define UNITY_FLOAT_TYPE to specify doubles instead of single precision
80 floats
81 * - define UNITY_INCLUDE_DOUBLE to allow double floating point comparisons
82 * - define UNITY_EXCLUDE_DOUBLE to disallow double floating point
83 comparisons (default)
84 * - define UNITY_DOUBLE_PRECISION to specify the precision to use when
85 doing TEST_ASSERT_EQUAL_DOUBLE
86 * - define UNITY_DOUBLE_TYPE to specify something other than double
87 * - define UNITY_EXCLUDE_FLOAT_PRINT to trim binary size, won't print
88 floating point values in errors
89
90 * Output
91 * - by default, Unity prints to standard out with putchar. define
92 UNITY_OUTPUT_CHAR(a) with a different function if desired
93 * - define UNITY_DIFFERENTIATE_FINAL_FAIL to print FAILED (vs. FAIL) at
94 test end summary - for automated search for failure
95
96 * Optimization
97 * - by default, line numbers are stored in unsigned shorts. Define
98 UNITY_LINE_TYPE with a different type if your files are huge
99 * - by default, test and failure counters are unsigned shorts. Define
100 UNITY_COUNTER_TYPE with a different type if you want to save space or have more
101 than 65535 Tests.
102
103 * Test Cases
104 * - define UNITY_SUPPORT_TEST_CASES to include the TEST_CASE macro, though
105 really it's mostly about the runner generator script
106
107 * Parameterized Tests
108 * - you'll want to create a define of TEST_CASE(...) which basically
109 evaluates to nothing
110
111 * Tests with Arguments
112 * - you'll want to define UNITY_USE_COMMAND_LINE_ARGS if you have the test
113 runner passing arguments to Unity
114
115 *-------------------------------------------------------
116 * Basic Fail and Ignore
117 *-------------------------------------------------------*/
118
119#define TEST_FAIL_MESSAGE(message) UNITY_TEST_FAIL(__LINE__, (message))
120#define TEST_FAIL() UNITY_TEST_FAIL(__LINE__, NULL)
121#define TEST_IGNORE_MESSAGE(message) UNITY_TEST_IGNORE(__LINE__, (message))
122#define TEST_IGNORE() UNITY_TEST_IGNORE(__LINE__, NULL)
123#define TEST_MESSAGE(message) UnityMessage((message), __LINE__)
124#define TEST_ONLY()
125#ifdef UNITY_INCLUDE_PRINT_FORMATTED
126#define TEST_PRINTF(message, ...) UnityPrintF(__LINE__, (message), __VA_ARGS__)
127#endif
128
129/* It is not necessary for you to call PASS. A PASS condition is assumed if
130 * nothing fails.
131 * This method allows you to abort a test immediately with a PASS state,
132 * ignoring the remainder of the test. */
133#define TEST_PASS() TEST_ABORT()
134#define TEST_PASS_MESSAGE(message) \
135 do { \
136 UnityMessage((message), __LINE__); \
137 TEST_ABORT(); \
138 } while (0)
139
140/* This macro does nothing, but it is useful for build tools (like Ceedling) to
141 * make use of this to figure out which files should be linked to in order to
142 * perform a test. Use it like TEST_FILE("sandwiches.c") */
143#define TEST_FILE(a)
144
145/*-------------------------------------------------------
146 * Test Asserts (simple)
147 *-------------------------------------------------------*/
148
149/* Boolean */
150#define TEST_ASSERT(condition) \
151 UNITY_TEST_ASSERT((condition), __LINE__, " Expression Evaluated To FALSE")
152#define TEST_ASSERT_TRUE(condition) \
153 UNITY_TEST_ASSERT((condition), __LINE__, " Expected TRUE Was FALSE")
154#define TEST_ASSERT_UNLESS(condition) \
155 UNITY_TEST_ASSERT(!(condition), __LINE__, " Expression Evaluated To TRUE")
156#define TEST_ASSERT_FALSE(condition) \
157 UNITY_TEST_ASSERT(!(condition), __LINE__, " Expected FALSE Was TRUE")
158#define TEST_ASSERT_NULL(pointer) \
159 UNITY_TEST_ASSERT_NULL((pointer), __LINE__, " Expected NULL")
160#define TEST_ASSERT_NOT_NULL(pointer) \
161 UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, " Expected Non-NULL")
162#define TEST_ASSERT_EMPTY(pointer) \
163 UNITY_TEST_ASSERT_EMPTY((pointer), __LINE__, " Expected Empty")
164#define TEST_ASSERT_NOT_EMPTY(pointer) \
165 UNITY_TEST_ASSERT_NOT_EMPTY((pointer), __LINE__, " Expected Non-Empty")
166
167/* Integers (of all sizes) */
168#define TEST_ASSERT_EQUAL_INT(expected, actual) \
169 UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
170#define TEST_ASSERT_EQUAL_INT8(expected, actual) \
171 UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, NULL)
172#define TEST_ASSERT_EQUAL_INT16(expected, actual) \
173 UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, NULL)
174#define TEST_ASSERT_EQUAL_INT32(expected, actual) \
175 UNITY_TEST_ASSERT_EQUAL_INT32((expected), (actual), __LINE__, NULL)
176#define TEST_ASSERT_EQUAL_INT64(expected, actual) \
177 UNITY_TEST_ASSERT_EQUAL_INT64((expected), (actual), __LINE__, NULL)
178#define TEST_ASSERT_EQUAL_UINT(expected, actual) \
179 UNITY_TEST_ASSERT_EQUAL_UINT((expected), (actual), __LINE__, NULL)
180#define TEST_ASSERT_EQUAL_UINT8(expected, actual) \
181 UNITY_TEST_ASSERT_EQUAL_UINT8((expected), (actual), __LINE__, NULL)
182#define TEST_ASSERT_EQUAL_UINT16(expected, actual) \
183 UNITY_TEST_ASSERT_EQUAL_UINT16((expected), (actual), __LINE__, NULL)
184#define TEST_ASSERT_EQUAL_UINT32(expected, actual) \
185 UNITY_TEST_ASSERT_EQUAL_UINT32((expected), (actual), __LINE__, NULL)
186#define TEST_ASSERT_EQUAL_UINT64(expected, actual) \
187 UNITY_TEST_ASSERT_EQUAL_UINT64((expected), (actual), __LINE__, NULL)
188#define TEST_ASSERT_EQUAL_size_t(expected, actual) \
189 UNITY_TEST_ASSERT_EQUAL_UINT((expected), (actual), __LINE__, NULL)
190#define TEST_ASSERT_EQUAL_HEX(expected, actual) \
191 UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, NULL)
192#define TEST_ASSERT_EQUAL_HEX8(expected, actual) \
193 UNITY_TEST_ASSERT_EQUAL_HEX8((expected), (actual), __LINE__, NULL)
194#define TEST_ASSERT_EQUAL_HEX16(expected, actual) \
195 UNITY_TEST_ASSERT_EQUAL_HEX16((expected), (actual), __LINE__, NULL)
196#define TEST_ASSERT_EQUAL_HEX32(expected, actual) \
197 UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, NULL)
198#define TEST_ASSERT_EQUAL_HEX64(expected, actual) \
199 UNITY_TEST_ASSERT_EQUAL_HEX64((expected), (actual), __LINE__, NULL)
200#define TEST_ASSERT_EQUAL_CHAR(expected, actual) \
201 UNITY_TEST_ASSERT_EQUAL_CHAR((expected), (actual), __LINE__, NULL)
202#define TEST_ASSERT_BITS(mask, expected, actual) \
203 UNITY_TEST_ASSERT_BITS((mask), (expected), (actual), __LINE__, NULL)
204#define TEST_ASSERT_BITS_HIGH(mask, actual) \
205 UNITY_TEST_ASSERT_BITS((mask), (UNITY_UINT32)(-1), (actual), __LINE__, NULL)
206#define TEST_ASSERT_BITS_LOW(mask, actual) \
207 UNITY_TEST_ASSERT_BITS((mask), (UNITY_UINT32)(0), (actual), __LINE__, NULL)
208#define TEST_ASSERT_BIT_HIGH(bit, actual) \
209 UNITY_TEST_ASSERT_BITS(((UNITY_UINT32)1 << (bit)), (UNITY_UINT32)(-1), \
210 (actual), __LINE__, NULL)
211#define TEST_ASSERT_BIT_LOW(bit, actual) \
212 UNITY_TEST_ASSERT_BITS(((UNITY_UINT32)1 << (bit)), (UNITY_UINT32)(0), \
213 (actual), __LINE__, NULL)
214
215/* Integer Not Equal To (of all sizes) */
216#define TEST_ASSERT_NOT_EQUAL_INT(threshold, actual) \
217 UNITY_TEST_ASSERT_NOT_EQUAL_INT((threshold), (actual), __LINE__, NULL)
218#define TEST_ASSERT_NOT_EQUAL_INT8(threshold, actual) \
219 UNITY_TEST_ASSERT_NOT_EQUAL_INT8((threshold), (actual), __LINE__, NULL)
220#define TEST_ASSERT_NOT_EQUAL_INT16(threshold, actual) \
221 UNITY_TEST_ASSERT_NOT_EQUAL_INT16((threshold), (actual), __LINE__, NULL)
222#define TEST_ASSERT_NOT_EQUAL_INT32(threshold, actual) \
223 UNITY_TEST_ASSERT_NOT_EQUAL_INT32((threshold), (actual), __LINE__, NULL)
224#define TEST_ASSERT_NOT_EQUAL_INT64(threshold, actual) \
225 UNITY_TEST_ASSERT_NOT_EQUAL_INT64((threshold), (actual), __LINE__, NULL)
226#define TEST_ASSERT_NOT_EQUAL_UINT(threshold, actual) \
227 UNITY_TEST_ASSERT_NOT_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
228#define TEST_ASSERT_NOT_EQUAL_UINT8(threshold, actual) \
229 UNITY_TEST_ASSERT_NOT_EQUAL_UINT8((threshold), (actual), __LINE__, NULL)
230#define TEST_ASSERT_NOT_EQUAL_UINT16(threshold, actual) \
231 UNITY_TEST_ASSERT_NOT_EQUAL_UINT16((threshold), (actual), __LINE__, NULL)
232#define TEST_ASSERT_NOT_EQUAL_UINT32(threshold, actual) \
233 UNITY_TEST_ASSERT_NOT_EQUAL_UINT32((threshold), (actual), __LINE__, NULL)
234#define TEST_ASSERT_NOT_EQUAL_UINT64(threshold, actual) \
235 UNITY_TEST_ASSERT_NOT_EQUAL_UINT64((threshold), (actual), __LINE__, NULL)
236#define TEST_ASSERT_NOT_EQUAL_size_t(threshold, actual) \
237 UNITY_TEST_ASSERT_NOT_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
238#define TEST_ASSERT_NOT_EQUAL_HEX8(threshold, actual) \
239 UNITY_TEST_ASSERT_NOT_EQUAL_HEX8((threshold), (actual), __LINE__, NULL)
240#define TEST_ASSERT_NOT_EQUAL_HEX16(threshold, actual) \
241 UNITY_TEST_ASSERT_NOT_EQUAL_HEX16((threshold), (actual), __LINE__, NULL)
242#define TEST_ASSERT_NOT_EQUAL_HEX32(threshold, actual) \
243 UNITY_TEST_ASSERT_NOT_EQUAL_HEX32((threshold), (actual), __LINE__, NULL)
244#define TEST_ASSERT_NOT_EQUAL_HEX64(threshold, actual) \
245 UNITY_TEST_ASSERT_NOT_EQUAL_HEX64((threshold), (actual), __LINE__, NULL)
246#define TEST_ASSERT_NOT_EQUAL_CHAR(threshold, actual) \
247 UNITY_TEST_ASSERT_NOT_EQUAL_CHAR((threshold), (actual), __LINE__, NULL)
248
249/* Integer Greater Than/ Less Than (of all sizes) */
250#define TEST_ASSERT_GREATER_THAN(threshold, actual) \
251 UNITY_TEST_ASSERT_GREATER_THAN_INT((threshold), (actual), __LINE__, NULL)
252#define TEST_ASSERT_GREATER_THAN_INT(threshold, actual) \
253 UNITY_TEST_ASSERT_GREATER_THAN_INT((threshold), (actual), __LINE__, NULL)
254#define TEST_ASSERT_GREATER_THAN_INT8(threshold, actual) \
255 UNITY_TEST_ASSERT_GREATER_THAN_INT8((threshold), (actual), __LINE__, NULL)
256#define TEST_ASSERT_GREATER_THAN_INT16(threshold, actual) \
257 UNITY_TEST_ASSERT_GREATER_THAN_INT16((threshold), (actual), __LINE__, NULL)
258#define TEST_ASSERT_GREATER_THAN_INT32(threshold, actual) \
259 UNITY_TEST_ASSERT_GREATER_THAN_INT32((threshold), (actual), __LINE__, NULL)
260#define TEST_ASSERT_GREATER_THAN_INT64(threshold, actual) \
261 UNITY_TEST_ASSERT_GREATER_THAN_INT64((threshold), (actual), __LINE__, NULL)
262#define TEST_ASSERT_GREATER_THAN_UINT(threshold, actual) \
263 UNITY_TEST_ASSERT_GREATER_THAN_UINT((threshold), (actual), __LINE__, NULL)
264#define TEST_ASSERT_GREATER_THAN_UINT8(threshold, actual) \
265 UNITY_TEST_ASSERT_GREATER_THAN_UINT8((threshold), (actual), __LINE__, NULL)
266#define TEST_ASSERT_GREATER_THAN_UINT16(threshold, actual) \
267 UNITY_TEST_ASSERT_GREATER_THAN_UINT16((threshold), (actual), __LINE__, NULL)
268#define TEST_ASSERT_GREATER_THAN_UINT32(threshold, actual) \
269 UNITY_TEST_ASSERT_GREATER_THAN_UINT32((threshold), (actual), __LINE__, NULL)
270#define TEST_ASSERT_GREATER_THAN_UINT64(threshold, actual) \
271 UNITY_TEST_ASSERT_GREATER_THAN_UINT64((threshold), (actual), __LINE__, NULL)
272#define TEST_ASSERT_GREATER_THAN_size_t(threshold, actual) \
273 UNITY_TEST_ASSERT_GREATER_THAN_UINT((threshold), (actual), __LINE__, NULL)
274#define TEST_ASSERT_GREATER_THAN_HEX8(threshold, actual) \
275 UNITY_TEST_ASSERT_GREATER_THAN_HEX8((threshold), (actual), __LINE__, NULL)
276#define TEST_ASSERT_GREATER_THAN_HEX16(threshold, actual) \
277 UNITY_TEST_ASSERT_GREATER_THAN_HEX16((threshold), (actual), __LINE__, NULL)
278#define TEST_ASSERT_GREATER_THAN_HEX32(threshold, actual) \
279 UNITY_TEST_ASSERT_GREATER_THAN_HEX32((threshold), (actual), __LINE__, NULL)
280#define TEST_ASSERT_GREATER_THAN_HEX64(threshold, actual) \
281 UNITY_TEST_ASSERT_GREATER_THAN_HEX64((threshold), (actual), __LINE__, NULL)
282#define TEST_ASSERT_GREATER_THAN_CHAR(threshold, actual) \
283 UNITY_TEST_ASSERT_GREATER_THAN_CHAR((threshold), (actual), __LINE__, NULL)
284
285#define TEST_ASSERT_LESS_THAN(threshold, actual) \
286 UNITY_TEST_ASSERT_SMALLER_THAN_INT((threshold), (actual), __LINE__, NULL)
287#define TEST_ASSERT_LESS_THAN_INT(threshold, actual) \
288 UNITY_TEST_ASSERT_SMALLER_THAN_INT((threshold), (actual), __LINE__, NULL)
289#define TEST_ASSERT_LESS_THAN_INT8(threshold, actual) \
290 UNITY_TEST_ASSERT_SMALLER_THAN_INT8((threshold), (actual), __LINE__, NULL)
291#define TEST_ASSERT_LESS_THAN_INT16(threshold, actual) \
292 UNITY_TEST_ASSERT_SMALLER_THAN_INT16((threshold), (actual), __LINE__, NULL)
293#define TEST_ASSERT_LESS_THAN_INT32(threshold, actual) \
294 UNITY_TEST_ASSERT_SMALLER_THAN_INT32((threshold), (actual), __LINE__, NULL)
295#define TEST_ASSERT_LESS_THAN_INT64(threshold, actual) \
296 UNITY_TEST_ASSERT_SMALLER_THAN_INT64((threshold), (actual), __LINE__, NULL)
297#define TEST_ASSERT_LESS_THAN_UINT(threshold, actual) \
298 UNITY_TEST_ASSERT_SMALLER_THAN_UINT((threshold), (actual), __LINE__, NULL)
299#define TEST_ASSERT_LESS_THAN_UINT8(threshold, actual) \
300 UNITY_TEST_ASSERT_SMALLER_THAN_UINT8((threshold), (actual), __LINE__, NULL)
301#define TEST_ASSERT_LESS_THAN_UINT16(threshold, actual) \
302 UNITY_TEST_ASSERT_SMALLER_THAN_UINT16((threshold), (actual), __LINE__, NULL)
303#define TEST_ASSERT_LESS_THAN_UINT32(threshold, actual) \
304 UNITY_TEST_ASSERT_SMALLER_THAN_UINT32((threshold), (actual), __LINE__, NULL)
305#define TEST_ASSERT_LESS_THAN_UINT64(threshold, actual) \
306 UNITY_TEST_ASSERT_SMALLER_THAN_UINT64((threshold), (actual), __LINE__, NULL)
307#define TEST_ASSERT_LESS_THAN_size_t(threshold, actual) \
308 UNITY_TEST_ASSERT_SMALLER_THAN_UINT((threshold), (actual), __LINE__, NULL)
309#define TEST_ASSERT_LESS_THAN_HEX8(threshold, actual) \
310 UNITY_TEST_ASSERT_SMALLER_THAN_HEX8((threshold), (actual), __LINE__, NULL)
311#define TEST_ASSERT_LESS_THAN_HEX16(threshold, actual) \
312 UNITY_TEST_ASSERT_SMALLER_THAN_HEX16((threshold), (actual), __LINE__, NULL)
313#define TEST_ASSERT_LESS_THAN_HEX32(threshold, actual) \
314 UNITY_TEST_ASSERT_SMALLER_THAN_HEX32((threshold), (actual), __LINE__, NULL)
315#define TEST_ASSERT_LESS_THAN_HEX64(threshold, actual) \
316 UNITY_TEST_ASSERT_SMALLER_THAN_HEX64((threshold), (actual), __LINE__, NULL)
317#define TEST_ASSERT_LESS_THAN_CHAR(threshold, actual) \
318 UNITY_TEST_ASSERT_SMALLER_THAN_CHAR((threshold), (actual), __LINE__, NULL)
319
320#define TEST_ASSERT_GREATER_OR_EQUAL(threshold, actual) \
321 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT((threshold), (actual), __LINE__, NULL)
322#define TEST_ASSERT_GREATER_OR_EQUAL_INT(threshold, actual) \
323 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT((threshold), (actual), __LINE__, NULL)
324#define TEST_ASSERT_GREATER_OR_EQUAL_INT8(threshold, actual) \
325 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT8((threshold), (actual), __LINE__, NULL)
326#define TEST_ASSERT_GREATER_OR_EQUAL_INT16(threshold, actual) \
327 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT16((threshold), (actual), __LINE__, \
328 NULL)
329#define TEST_ASSERT_GREATER_OR_EQUAL_INT32(threshold, actual) \
330 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT32((threshold), (actual), __LINE__, \
331 NULL)
332#define TEST_ASSERT_GREATER_OR_EQUAL_INT64(threshold, actual) \
333 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT64((threshold), (actual), __LINE__, \
334 NULL)
335#define TEST_ASSERT_GREATER_OR_EQUAL_UINT(threshold, actual) \
336 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
337#define TEST_ASSERT_GREATER_OR_EQUAL_UINT8(threshold, actual) \
338 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT8((threshold), (actual), __LINE__, \
339 NULL)
340#define TEST_ASSERT_GREATER_OR_EQUAL_UINT16(threshold, actual) \
341 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT16((threshold), (actual), __LINE__, \
342 NULL)
343#define TEST_ASSERT_GREATER_OR_EQUAL_UINT32(threshold, actual) \
344 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT32((threshold), (actual), __LINE__, \
345 NULL)
346#define TEST_ASSERT_GREATER_OR_EQUAL_UINT64(threshold, actual) \
347 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT64((threshold), (actual), __LINE__, \
348 NULL)
349#define TEST_ASSERT_GREATER_OR_EQUAL_size_t(threshold, actual) \
350 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
351#define TEST_ASSERT_GREATER_OR_EQUAL_HEX8(threshold, actual) \
352 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX8((threshold), (actual), __LINE__, NULL)
353#define TEST_ASSERT_GREATER_OR_EQUAL_HEX16(threshold, actual) \
354 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX16((threshold), (actual), __LINE__, \
355 NULL)
356#define TEST_ASSERT_GREATER_OR_EQUAL_HEX32(threshold, actual) \
357 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX32((threshold), (actual), __LINE__, \
358 NULL)
359#define TEST_ASSERT_GREATER_OR_EQUAL_HEX64(threshold, actual) \
360 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX64((threshold), (actual), __LINE__, \
361 NULL)
362#define TEST_ASSERT_GREATER_OR_EQUAL_CHAR(threshold, actual) \
363 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_CHAR((threshold), (actual), __LINE__, NULL)
364
365#define TEST_ASSERT_LESS_OR_EQUAL(threshold, actual) \
366 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT((threshold), (actual), __LINE__, NULL)
367#define TEST_ASSERT_LESS_OR_EQUAL_INT(threshold, actual) \
368 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT((threshold), (actual), __LINE__, NULL)
369#define TEST_ASSERT_LESS_OR_EQUAL_INT8(threshold, actual) \
370 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT8((threshold), (actual), __LINE__, NULL)
371#define TEST_ASSERT_LESS_OR_EQUAL_INT16(threshold, actual) \
372 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT16((threshold), (actual), __LINE__, \
373 NULL)
374#define TEST_ASSERT_LESS_OR_EQUAL_INT32(threshold, actual) \
375 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT32((threshold), (actual), __LINE__, \
376 NULL)
377#define TEST_ASSERT_LESS_OR_EQUAL_INT64(threshold, actual) \
378 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT64((threshold), (actual), __LINE__, \
379 NULL)
380#define TEST_ASSERT_LESS_OR_EQUAL_UINT(threshold, actual) \
381 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
382#define TEST_ASSERT_LESS_OR_EQUAL_UINT8(threshold, actual) \
383 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT8((threshold), (actual), __LINE__, \
384 NULL)
385#define TEST_ASSERT_LESS_OR_EQUAL_UINT16(threshold, actual) \
386 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT16((threshold), (actual), __LINE__, \
387 NULL)
388#define TEST_ASSERT_LESS_OR_EQUAL_UINT32(threshold, actual) \
389 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT32((threshold), (actual), __LINE__, \
390 NULL)
391#define TEST_ASSERT_LESS_OR_EQUAL_UINT64(threshold, actual) \
392 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT64((threshold), (actual), __LINE__, \
393 NULL)
394#define TEST_ASSERT_LESS_OR_EQUAL_size_t(threshold, actual) \
395 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT((threshold), (actual), __LINE__, NULL)
396#define TEST_ASSERT_LESS_OR_EQUAL_HEX8(threshold, actual) \
397 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX8((threshold), (actual), __LINE__, NULL)
398#define TEST_ASSERT_LESS_OR_EQUAL_HEX16(threshold, actual) \
399 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX16((threshold), (actual), __LINE__, \
400 NULL)
401#define TEST_ASSERT_LESS_OR_EQUAL_HEX32(threshold, actual) \
402 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX32((threshold), (actual), __LINE__, \
403 NULL)
404#define TEST_ASSERT_LESS_OR_EQUAL_HEX64(threshold, actual) \
405 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX64((threshold), (actual), __LINE__, \
406 NULL)
407#define TEST_ASSERT_LESS_OR_EQUAL_CHAR(threshold, actual) \
408 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_CHAR((threshold), (actual), __LINE__, NULL)
409
410/* Integer Ranges (of all sizes) */
411#define TEST_ASSERT_INT_WITHIN(delta, expected, actual) \
412 UNITY_TEST_ASSERT_INT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
413#define TEST_ASSERT_INT8_WITHIN(delta, expected, actual) \
414 UNITY_TEST_ASSERT_INT8_WITHIN((delta), (expected), (actual), __LINE__, NULL)
415#define TEST_ASSERT_INT16_WITHIN(delta, expected, actual) \
416 UNITY_TEST_ASSERT_INT16_WITHIN((delta), (expected), (actual), __LINE__, NULL)
417#define TEST_ASSERT_INT32_WITHIN(delta, expected, actual) \
418 UNITY_TEST_ASSERT_INT32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
419#define TEST_ASSERT_INT64_WITHIN(delta, expected, actual) \
420 UNITY_TEST_ASSERT_INT64_WITHIN((delta), (expected), (actual), __LINE__, NULL)
421#define TEST_ASSERT_UINT_WITHIN(delta, expected, actual) \
422 UNITY_TEST_ASSERT_UINT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
423#define TEST_ASSERT_UINT8_WITHIN(delta, expected, actual) \
424 UNITY_TEST_ASSERT_UINT8_WITHIN((delta), (expected), (actual), __LINE__, NULL)
425#define TEST_ASSERT_UINT16_WITHIN(delta, expected, actual) \
426 UNITY_TEST_ASSERT_UINT16_WITHIN((delta), (expected), (actual), __LINE__, NULL)
427#define TEST_ASSERT_UINT32_WITHIN(delta, expected, actual) \
428 UNITY_TEST_ASSERT_UINT32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
429#define TEST_ASSERT_UINT64_WITHIN(delta, expected, actual) \
430 UNITY_TEST_ASSERT_UINT64_WITHIN((delta), (expected), (actual), __LINE__, NULL)
431#define TEST_ASSERT_size_t_WITHIN(delta, expected, actual) \
432 UNITY_TEST_ASSERT_UINT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
433#define TEST_ASSERT_HEX_WITHIN(delta, expected, actual) \
434 UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
435#define TEST_ASSERT_HEX8_WITHIN(delta, expected, actual) \
436 UNITY_TEST_ASSERT_HEX8_WITHIN((delta), (expected), (actual), __LINE__, NULL)
437#define TEST_ASSERT_HEX16_WITHIN(delta, expected, actual) \
438 UNITY_TEST_ASSERT_HEX16_WITHIN((delta), (expected), (actual), __LINE__, NULL)
439#define TEST_ASSERT_HEX32_WITHIN(delta, expected, actual) \
440 UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, NULL)
441#define TEST_ASSERT_HEX64_WITHIN(delta, expected, actual) \
442 UNITY_TEST_ASSERT_HEX64_WITHIN((delta), (expected), (actual), __LINE__, NULL)
443#define TEST_ASSERT_CHAR_WITHIN(delta, expected, actual) \
444 UNITY_TEST_ASSERT_CHAR_WITHIN((delta), (expected), (actual), __LINE__, NULL)
445
446/* Integer Array Ranges (of all sizes) */
447#define TEST_ASSERT_INT_ARRAY_WITHIN(delta, expected, actual, num_elements) \
448 UNITY_TEST_ASSERT_INT_ARRAY_WITHIN((delta), (expected), (actual), \
449 num_elements, __LINE__, NULL)
450#define TEST_ASSERT_INT8_ARRAY_WITHIN(delta, expected, actual, num_elements) \
451 UNITY_TEST_ASSERT_INT8_ARRAY_WITHIN((delta), (expected), (actual), \
452 num_elements, __LINE__, NULL)
453#define TEST_ASSERT_INT16_ARRAY_WITHIN(delta, expected, actual, num_elements) \
454 UNITY_TEST_ASSERT_INT16_ARRAY_WITHIN((delta), (expected), (actual), \
455 num_elements, __LINE__, NULL)
456#define TEST_ASSERT_INT32_ARRAY_WITHIN(delta, expected, actual, num_elements) \
457 UNITY_TEST_ASSERT_INT32_ARRAY_WITHIN((delta), (expected), (actual), \
458 num_elements, __LINE__, NULL)
459#define TEST_ASSERT_INT64_ARRAY_WITHIN(delta, expected, actual, num_elements) \
460 UNITY_TEST_ASSERT_INT64_ARRAY_WITHIN((delta), (expected), (actual), \
461 num_elements, __LINE__, NULL)
462#define TEST_ASSERT_UINT_ARRAY_WITHIN(delta, expected, actual, num_elements) \
463 UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN((delta), (expected), (actual), \
464 num_elements, __LINE__, NULL)
465#define TEST_ASSERT_UINT8_ARRAY_WITHIN(delta, expected, actual, num_elements) \
466 UNITY_TEST_ASSERT_UINT8_ARRAY_WITHIN((delta), (expected), (actual), \
467 num_elements, __LINE__, NULL)
468#define TEST_ASSERT_UINT16_ARRAY_WITHIN(delta, expected, actual, num_elements) \
469 UNITY_TEST_ASSERT_UINT16_ARRAY_WITHIN((delta), (expected), (actual), \
470 num_elements, __LINE__, NULL)
471#define TEST_ASSERT_UINT32_ARRAY_WITHIN(delta, expected, actual, num_elements) \
472 UNITY_TEST_ASSERT_UINT32_ARRAY_WITHIN((delta), (expected), (actual), \
473 num_elements, __LINE__, NULL)
474#define TEST_ASSERT_UINT64_ARRAY_WITHIN(delta, expected, actual, num_elements) \
475 UNITY_TEST_ASSERT_UINT64_ARRAY_WITHIN((delta), (expected), (actual), \
476 num_elements, __LINE__, NULL)
477#define TEST_ASSERT_size_t_ARRAY_WITHIN(delta, expected, actual, num_elements) \
478 UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN((delta), (expected), (actual), \
479 num_elements, __LINE__, NULL)
480#define TEST_ASSERT_HEX_ARRAY_WITHIN(delta, expected, actual, num_elements) \
481 UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN((delta), (expected), (actual), \
482 num_elements, __LINE__, NULL)
483#define TEST_ASSERT_HEX8_ARRAY_WITHIN(delta, expected, actual, num_elements) \
484 UNITY_TEST_ASSERT_HEX8_ARRAY_WITHIN((delta), (expected), (actual), \
485 num_elements, __LINE__, NULL)
486#define TEST_ASSERT_HEX16_ARRAY_WITHIN(delta, expected, actual, num_elements) \
487 UNITY_TEST_ASSERT_HEX16_ARRAY_WITHIN((delta), (expected), (actual), \
488 num_elements, __LINE__, NULL)
489#define TEST_ASSERT_HEX32_ARRAY_WITHIN(delta, expected, actual, num_elements) \
490 UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN((delta), (expected), (actual), \
491 num_elements, __LINE__, NULL)
492#define TEST_ASSERT_HEX64_ARRAY_WITHIN(delta, expected, actual, num_elements) \
493 UNITY_TEST_ASSERT_HEX64_ARRAY_WITHIN((delta), (expected), (actual), \
494 num_elements, __LINE__, NULL)
495#define TEST_ASSERT_CHAR_ARRAY_WITHIN(delta, expected, actual, num_elements) \
496 UNITY_TEST_ASSERT_CHAR_ARRAY_WITHIN((delta), (expected), (actual), \
497 num_elements, __LINE__, NULL)
498
499/* Structs and Strings */
500#define TEST_ASSERT_EQUAL_PTR(expected, actual) \
501 UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, NULL)
502#define TEST_ASSERT_EQUAL_STRING(expected, actual) \
503 UNITY_TEST_ASSERT_EQUAL_STRING((expected), (actual), __LINE__, NULL)
504#define TEST_ASSERT_EQUAL_STRING_LEN(expected, actual, len) \
505 UNITY_TEST_ASSERT_EQUAL_STRING_LEN((expected), (actual), (len), __LINE__, \
506 NULL)
507#define TEST_ASSERT_EQUAL_MEMORY(expected, actual, len) \
508 UNITY_TEST_ASSERT_EQUAL_MEMORY((expected), (actual), (len), __LINE__, NULL)
509
510/* Arrays */
511#define TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements) \
512 UNITY_TEST_ASSERT_EQUAL_INT_ARRAY((expected), (actual), (num_elements), \
513 __LINE__, NULL)
514#define TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements) \
515 UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY((expected), (actual), (num_elements), \
516 __LINE__, NULL)
517#define TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements) \
518 UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY((expected), (actual), (num_elements), \
519 __LINE__, NULL)
520#define TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements) \
521 UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY((expected), (actual), (num_elements), \
522 __LINE__, NULL)
523#define TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements) \
524 UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY((expected), (actual), (num_elements), \
525 __LINE__, NULL)
526#define TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements) \
527 UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY((expected), (actual), (num_elements), \
528 __LINE__, NULL)
529#define TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements) \
530 UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY((expected), (actual), (num_elements), \
531 __LINE__, NULL)
532#define TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements) \
533 UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY((expected), (actual), (num_elements), \
534 __LINE__, NULL)
535#define TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements) \
536 UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY((expected), (actual), (num_elements), \
537 __LINE__, NULL)
538#define TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements) \
539 UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY((expected), (actual), (num_elements), \
540 __LINE__, NULL)
541#define TEST_ASSERT_EQUAL_size_t_ARRAY(expected, actual, num_elements) \
542 UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY((expected), (actual), (num_elements), \
543 __LINE__, NULL)
544#define TEST_ASSERT_EQUAL_HEX_ARRAY(expected, actual, num_elements) \
545 UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY((expected), (actual), (num_elements), \
546 __LINE__, NULL)
547#define TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements) \
548 UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY((expected), (actual), (num_elements), \
549 __LINE__, NULL)
550#define TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements) \
551 UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY((expected), (actual), (num_elements), \
552 __LINE__, NULL)
553#define TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements) \
554 UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY((expected), (actual), (num_elements), \
555 __LINE__, NULL)
556#define TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements) \
557 UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY((expected), (actual), (num_elements), \
558 __LINE__, NULL)
559#define TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements) \
560 UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY((expected), (actual), (num_elements), \
561 __LINE__, NULL)
562#define TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements) \
563 UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY((expected), (actual), (num_elements), \
564 __LINE__, NULL)
565#define TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements) \
566 UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((expected), (actual), (len), \
567 (num_elements), __LINE__, NULL)
568#define TEST_ASSERT_EQUAL_CHAR_ARRAY(expected, actual, num_elements) \
569 UNITY_TEST_ASSERT_EQUAL_CHAR_ARRAY((expected), (actual), (num_elements), \
570 __LINE__, NULL)
571
572/* Arrays Compared To Single Value */
573#define TEST_ASSERT_EACH_EQUAL_INT(expected, actual, num_elements) \
574 UNITY_TEST_ASSERT_EACH_EQUAL_INT((expected), (actual), (num_elements), \
575 __LINE__, NULL)
576#define TEST_ASSERT_EACH_EQUAL_INT8(expected, actual, num_elements) \
577 UNITY_TEST_ASSERT_EACH_EQUAL_INT8((expected), (actual), (num_elements), \
578 __LINE__, NULL)
579#define TEST_ASSERT_EACH_EQUAL_INT16(expected, actual, num_elements) \
580 UNITY_TEST_ASSERT_EACH_EQUAL_INT16((expected), (actual), (num_elements), \
581 __LINE__, NULL)
582#define TEST_ASSERT_EACH_EQUAL_INT32(expected, actual, num_elements) \
583 UNITY_TEST_ASSERT_EACH_EQUAL_INT32((expected), (actual), (num_elements), \
584 __LINE__, NULL)
585#define TEST_ASSERT_EACH_EQUAL_INT64(expected, actual, num_elements) \
586 UNITY_TEST_ASSERT_EACH_EQUAL_INT64((expected), (actual), (num_elements), \
587 __LINE__, NULL)
588#define TEST_ASSERT_EACH_EQUAL_UINT(expected, actual, num_elements) \
589 UNITY_TEST_ASSERT_EACH_EQUAL_UINT((expected), (actual), (num_elements), \
590 __LINE__, NULL)
591#define TEST_ASSERT_EACH_EQUAL_UINT8(expected, actual, num_elements) \
592 UNITY_TEST_ASSERT_EACH_EQUAL_UINT8((expected), (actual), (num_elements), \
593 __LINE__, NULL)
594#define TEST_ASSERT_EACH_EQUAL_UINT16(expected, actual, num_elements) \
595 UNITY_TEST_ASSERT_EACH_EQUAL_UINT16((expected), (actual), (num_elements), \
596 __LINE__, NULL)
597#define TEST_ASSERT_EACH_EQUAL_UINT32(expected, actual, num_elements) \
598 UNITY_TEST_ASSERT_EACH_EQUAL_UINT32((expected), (actual), (num_elements), \
599 __LINE__, NULL)
600#define TEST_ASSERT_EACH_EQUAL_UINT64(expected, actual, num_elements) \
601 UNITY_TEST_ASSERT_EACH_EQUAL_UINT64((expected), (actual), (num_elements), \
602 __LINE__, NULL)
603#define TEST_ASSERT_EACH_EQUAL_size_t(expected, actual, num_elements) \
604 UNITY_TEST_ASSERT_EACH_EQUAL_UINT((expected), (actual), (num_elements), \
605 __LINE__, NULL)
606#define TEST_ASSERT_EACH_EQUAL_HEX(expected, actual, num_elements) \
607 UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), \
608 __LINE__, NULL)
609#define TEST_ASSERT_EACH_EQUAL_HEX8(expected, actual, num_elements) \
610 UNITY_TEST_ASSERT_EACH_EQUAL_HEX8((expected), (actual), (num_elements), \
611 __LINE__, NULL)
612#define TEST_ASSERT_EACH_EQUAL_HEX16(expected, actual, num_elements) \
613 UNITY_TEST_ASSERT_EACH_EQUAL_HEX16((expected), (actual), (num_elements), \
614 __LINE__, NULL)
615#define TEST_ASSERT_EACH_EQUAL_HEX32(expected, actual, num_elements) \
616 UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), \
617 __LINE__, NULL)
618#define TEST_ASSERT_EACH_EQUAL_HEX64(expected, actual, num_elements) \
619 UNITY_TEST_ASSERT_EACH_EQUAL_HEX64((expected), (actual), (num_elements), \
620 __LINE__, NULL)
621#define TEST_ASSERT_EACH_EQUAL_PTR(expected, actual, num_elements) \
622 UNITY_TEST_ASSERT_EACH_EQUAL_PTR((expected), (actual), (num_elements), \
623 __LINE__, NULL)
624#define TEST_ASSERT_EACH_EQUAL_STRING(expected, actual, num_elements) \
625 UNITY_TEST_ASSERT_EACH_EQUAL_STRING((expected), (actual), (num_elements), \
626 __LINE__, NULL)
627#define TEST_ASSERT_EACH_EQUAL_MEMORY(expected, actual, len, num_elements) \
628 UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY((expected), (actual), (len), \
629 (num_elements), __LINE__, NULL)
630#define TEST_ASSERT_EACH_EQUAL_CHAR(expected, actual, num_elements) \
631 UNITY_TEST_ASSERT_EACH_EQUAL_CHAR((expected), (actual), (num_elements), \
632 __LINE__, NULL)
633
634/* Floating Point (If Enabled) */
635#define TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual) \
636 UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, NULL)
637#define TEST_ASSERT_EQUAL_FLOAT(expected, actual) \
638 UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, NULL)
639#define TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements) \
640 UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), \
641 __LINE__, NULL)
642#define TEST_ASSERT_EACH_EQUAL_FLOAT(expected, actual, num_elements) \
643 UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT((expected), (actual), (num_elements), \
644 __LINE__, NULL)
645#define TEST_ASSERT_FLOAT_IS_INF(actual) \
646 UNITY_TEST_ASSERT_FLOAT_IS_INF((actual), __LINE__, NULL)
647#define TEST_ASSERT_FLOAT_IS_NEG_INF(actual) \
648 UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF((actual), __LINE__, NULL)
649#define TEST_ASSERT_FLOAT_IS_NAN(actual) \
650 UNITY_TEST_ASSERT_FLOAT_IS_NAN((actual), __LINE__, NULL)
651#define TEST_ASSERT_FLOAT_IS_DETERMINATE(actual) \
652 UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE((actual), __LINE__, NULL)
653#define TEST_ASSERT_FLOAT_IS_NOT_INF(actual) \
654 UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF((actual), __LINE__, NULL)
655#define TEST_ASSERT_FLOAT_IS_NOT_NEG_INF(actual) \
656 UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF((actual), __LINE__, NULL)
657#define TEST_ASSERT_FLOAT_IS_NOT_NAN(actual) \
658 UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN((actual), __LINE__, NULL)
659#define TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE(actual) \
660 UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE((actual), __LINE__, NULL)
661
662/* Double (If Enabled) */
663#define TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual) \
664 UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, NULL)
665#define TEST_ASSERT_EQUAL_DOUBLE(expected, actual) \
666 UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, NULL)
667#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements) \
668 UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), \
669 __LINE__, NULL)
670#define TEST_ASSERT_EACH_EQUAL_DOUBLE(expected, actual, num_elements) \
671 UNITY_TEST_ASSERT_EACH_EQUAL_DOUBLE((expected), (actual), (num_elements), \
672 __LINE__, NULL)
673#define TEST_ASSERT_DOUBLE_IS_INF(actual) \
674 UNITY_TEST_ASSERT_DOUBLE_IS_INF((actual), __LINE__, NULL)
675#define TEST_ASSERT_DOUBLE_IS_NEG_INF(actual) \
676 UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF((actual), __LINE__, NULL)
677#define TEST_ASSERT_DOUBLE_IS_NAN(actual) \
678 UNITY_TEST_ASSERT_DOUBLE_IS_NAN((actual), __LINE__, NULL)
679#define TEST_ASSERT_DOUBLE_IS_DETERMINATE(actual) \
680 UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE((actual), __LINE__, NULL)
681#define TEST_ASSERT_DOUBLE_IS_NOT_INF(actual) \
682 UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF((actual), __LINE__, NULL)
683#define TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF(actual) \
684 UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF((actual), __LINE__, NULL)
685#define TEST_ASSERT_DOUBLE_IS_NOT_NAN(actual) \
686 UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN((actual), __LINE__, NULL)
687#define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE(actual) \
688 UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE((actual), __LINE__, NULL)
689
690/* Shorthand */
691#ifdef UNITY_SHORTHAND_AS_OLD
692#define TEST_ASSERT_EQUAL(expected, actual) \
693 UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
694#define TEST_ASSERT_NOT_EQUAL(expected, actual) \
695 UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, " Expected Not-Equal")
696#endif
697#ifdef UNITY_SHORTHAND_AS_INT
698#define TEST_ASSERT_EQUAL(expected, actual) \
699 UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
700#define TEST_ASSERT_NOT_EQUAL(expected, actual) \
701 UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
702#endif
703#ifdef UNITY_SHORTHAND_AS_MEM
704#define TEST_ASSERT_EQUAL(expected, actual) \
705 UNITY_TEST_ASSERT_EQUAL_MEMORY((&expected), (&actual), sizeof(expected), \
706 __LINE__, NULL)
707#define TEST_ASSERT_NOT_EQUAL(expected, actual) \
708 UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
709#endif
710#ifdef UNITY_SHORTHAND_AS_RAW
711#define TEST_ASSERT_EQUAL(expected, actual) \
712 UNITY_TEST_ASSERT(((expected) == (actual)), __LINE__, " Expected Equal")
713#define TEST_ASSERT_NOT_EQUAL(expected, actual) \
714 UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, " Expected Not-Equal")
715#endif
716#ifdef UNITY_SHORTHAND_AS_NONE
717#define TEST_ASSERT_EQUAL(expected, actual) \
718 UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
719#define TEST_ASSERT_NOT_EQUAL(expected, actual) \
720 UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
721#endif
722
723/*-------------------------------------------------------
724 * Test Asserts (with additional messages)
725 *-------------------------------------------------------*/
726
727/* Boolean */
728#define TEST_ASSERT_MESSAGE(condition, message) \
729 UNITY_TEST_ASSERT((condition), __LINE__, (message))
730#define TEST_ASSERT_TRUE_MESSAGE(condition, message) \
731 UNITY_TEST_ASSERT((condition), __LINE__, (message))
732#define TEST_ASSERT_UNLESS_MESSAGE(condition, message) \
733 UNITY_TEST_ASSERT(!(condition), __LINE__, (message))
734#define TEST_ASSERT_FALSE_MESSAGE(condition, message) \
735 UNITY_TEST_ASSERT(!(condition), __LINE__, (message))
736#define TEST_ASSERT_NULL_MESSAGE(pointer, message) \
737 UNITY_TEST_ASSERT_NULL((pointer), __LINE__, (message))
738#define TEST_ASSERT_NOT_NULL_MESSAGE(pointer, message) \
739 UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, (message))
740#define TEST_ASSERT_EMPTY_MESSAGE(pointer, message) \
741 UNITY_TEST_ASSERT_EMPTY((pointer), __LINE__, (message))
742#define TEST_ASSERT_NOT_EMPTY_MESSAGE(pointer, message) \
743 UNITY_TEST_ASSERT_NOT_EMPTY((pointer), __LINE__, (message))
744
745/* Integers (of all sizes) */
746#define TEST_ASSERT_EQUAL_INT_MESSAGE(expected, actual, message) \
747 UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, (message))
748#define TEST_ASSERT_EQUAL_INT8_MESSAGE(expected, actual, message) \
749 UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, (message))
750#define TEST_ASSERT_EQUAL_INT16_MESSAGE(expected, actual, message) \
751 UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, (message))
752#define TEST_ASSERT_EQUAL_INT32_MESSAGE(expected, actual, message) \
753 UNITY_TEST_ASSERT_EQUAL_INT32((expected), (actual), __LINE__, (message))
754#define TEST_ASSERT_EQUAL_INT64_MESSAGE(expected, actual, message) \
755 UNITY_TEST_ASSERT_EQUAL_INT64((expected), (actual), __LINE__, (message))
756#define TEST_ASSERT_EQUAL_UINT_MESSAGE(expected, actual, message) \
757 UNITY_TEST_ASSERT_EQUAL_UINT((expected), (actual), __LINE__, (message))
758#define TEST_ASSERT_EQUAL_UINT8_MESSAGE(expected, actual, message) \
759 UNITY_TEST_ASSERT_EQUAL_UINT8((expected), (actual), __LINE__, (message))
760#define TEST_ASSERT_EQUAL_UINT16_MESSAGE(expected, actual, message) \
761 UNITY_TEST_ASSERT_EQUAL_UINT16((expected), (actual), __LINE__, (message))
762#define TEST_ASSERT_EQUAL_UINT32_MESSAGE(expected, actual, message) \
763 UNITY_TEST_ASSERT_EQUAL_UINT32((expected), (actual), __LINE__, (message))
764#define TEST_ASSERT_EQUAL_UINT64_MESSAGE(expected, actual, message) \
765 UNITY_TEST_ASSERT_EQUAL_UINT64((expected), (actual), __LINE__, (message))
766#define TEST_ASSERT_EQUAL_size_t_MESSAGE(expected, actual, message) \
767 UNITY_TEST_ASSERT_EQUAL_UINT((expected), (actual), __LINE__, (message))
768#define TEST_ASSERT_EQUAL_HEX_MESSAGE(expected, actual, message) \
769 UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, (message))
770#define TEST_ASSERT_EQUAL_HEX8_MESSAGE(expected, actual, message) \
771 UNITY_TEST_ASSERT_EQUAL_HEX8((expected), (actual), __LINE__, (message))
772#define TEST_ASSERT_EQUAL_HEX16_MESSAGE(expected, actual, message) \
773 UNITY_TEST_ASSERT_EQUAL_HEX16((expected), (actual), __LINE__, (message))
774#define TEST_ASSERT_EQUAL_HEX32_MESSAGE(expected, actual, message) \
775 UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, (message))
776#define TEST_ASSERT_EQUAL_HEX64_MESSAGE(expected, actual, message) \
777 UNITY_TEST_ASSERT_EQUAL_HEX64((expected), (actual), __LINE__, (message))
778#define TEST_ASSERT_BITS_MESSAGE(mask, expected, actual, message) \
779 UNITY_TEST_ASSERT_BITS((mask), (expected), (actual), __LINE__, (message))
780#define TEST_ASSERT_BITS_HIGH_MESSAGE(mask, actual, message) \
781 UNITY_TEST_ASSERT_BITS((mask), (UNITY_UINT32)(-1), (actual), __LINE__, \
782 (message))
783#define TEST_ASSERT_BITS_LOW_MESSAGE(mask, actual, message) \
784 UNITY_TEST_ASSERT_BITS((mask), (UNITY_UINT32)(0), (actual), __LINE__, \
785 (message))
786#define TEST_ASSERT_BIT_HIGH_MESSAGE(bit, actual, message) \
787 UNITY_TEST_ASSERT_BITS(((UNITY_UINT32)1 << (bit)), (UNITY_UINT32)(-1), \
788 (actual), __LINE__, (message))
789#define TEST_ASSERT_BIT_LOW_MESSAGE(bit, actual, message) \
790 UNITY_TEST_ASSERT_BITS(((UNITY_UINT32)1 << (bit)), (UNITY_UINT32)(0), \
791 (actual), __LINE__, (message))
792#define TEST_ASSERT_EQUAL_CHAR_MESSAGE(expected, actual, message) \
793 UNITY_TEST_ASSERT_EQUAL_CHAR((expected), (actual), __LINE__, (message))
794
795/* Integer Not Equal To (of all sizes) */
796#define TEST_ASSERT_NOT_EQUAL_INT_MESSAGE(threshold, actual, message) \
797 UNITY_TEST_ASSERT_NOT_EQUAL_INT((threshold), (actual), __LINE__, (message))
798#define TEST_ASSERT_NOT_EQUAL_INT8_MESSAGE(threshold, actual, message) \
799 UNITY_TEST_ASSERT_NOT_EQUAL_INT8((threshold), (actual), __LINE__, (message))
800#define TEST_ASSERT_NOT_EQUAL_INT16_MESSAGE(threshold, actual, message) \
801 UNITY_TEST_ASSERT_NOT_EQUAL_INT16((threshold), (actual), __LINE__, (message))
802#define TEST_ASSERT_NOT_EQUAL_INT32_MESSAGE(threshold, actual, message) \
803 UNITY_TEST_ASSERT_NOT_EQUAL_INT32((threshold), (actual), __LINE__, (message))
804#define TEST_ASSERT_NOT_EQUAL_INT64_MESSAGE(threshold, actual, message) \
805 UNITY_TEST_ASSERT_NOT_EQUAL_INT64((threshold), (actual), __LINE__, (message))
806#define TEST_ASSERT_NOT_EQUAL_UINT_MESSAGE(threshold, actual, message) \
807 UNITY_TEST_ASSERT_NOT_EQUAL_UINT((threshold), (actual), __LINE__, (message))
808#define TEST_ASSERT_NOT_EQUAL_UINT8_MESSAGE(threshold, actual, message) \
809 UNITY_TEST_ASSERT_NOT_EQUAL_UINT8((threshold), (actual), __LINE__, (message))
810#define TEST_ASSERT_NOT_EQUAL_UINT16_MESSAGE(threshold, actual, message) \
811 UNITY_TEST_ASSERT_NOT_EQUAL_UINT16((threshold), (actual), __LINE__, (message))
812#define TEST_ASSERT_NOT_EQUAL_UINT32_MESSAGE(threshold, actual, message) \
813 UNITY_TEST_ASSERT_NOT_EQUAL_UINT32((threshold), (actual), __LINE__, (message))
814#define TEST_ASSERT_NOT_EQUAL_UINT64_MESSAGE(threshold, actual, message) \
815 UNITY_TEST_ASSERT_NOT_EQUAL_UINT64((threshold), (actual), __LINE__, (message))
816#define TEST_ASSERT_NOT_EQUAL_size_t_MESSAGE(threshold, actual, message) \
817 UNITY_TEST_ASSERT_NOT_EQUAL_UINT((threshold), (actual), __LINE__, (message))
818#define TEST_ASSERT_NOT_EQUAL_HEX8_MESSAGE(threshold, actual, message) \
819 UNITY_TEST_ASSERT_NOT_EQUAL_HEX8((threshold), (actual), __LINE__, (message))
820#define TEST_ASSERT_NOT_EQUAL_HEX16_MESSAGE(threshold, actual, message) \
821 UNITY_TEST_ASSERT_NOT_EQUAL_HEX16((threshold), (actual), __LINE__, (message))
822#define TEST_ASSERT_NOT_EQUAL_HEX32_MESSAGE(threshold, actual, message) \
823 UNITY_TEST_ASSERT_NOT_EQUAL_HEX32((threshold), (actual), __LINE__, (message))
824#define TEST_ASSERT_NOT_EQUAL_HEX64_MESSAGE(threshold, actual, message) \
825 UNITY_TEST_ASSERT_NOT_EQUAL_HEX64((threshold), (actual), __LINE__, (message))
826#define TEST_ASSERT_NOT_EQUAL_CHAR_MESSAGE(threshold, actual, message) \
827 UNITY_TEST_ASSERT_NOT_EQUAL_CHAR((threshold), (actual), __LINE__, (message))
828
829/* Integer Greater Than/ Less Than (of all sizes) */
830#define TEST_ASSERT_GREATER_THAN_MESSAGE(threshold, actual, message) \
831 UNITY_TEST_ASSERT_GREATER_THAN_INT((threshold), (actual), __LINE__, (message))
832#define TEST_ASSERT_GREATER_THAN_INT_MESSAGE(threshold, actual, message) \
833 UNITY_TEST_ASSERT_GREATER_THAN_INT((threshold), (actual), __LINE__, (message))
834#define TEST_ASSERT_GREATER_THAN_INT8_MESSAGE(threshold, actual, message) \
835 UNITY_TEST_ASSERT_GREATER_THAN_INT8((threshold), (actual), __LINE__, \
836 (message))
837#define TEST_ASSERT_GREATER_THAN_INT16_MESSAGE(threshold, actual, message) \
838 UNITY_TEST_ASSERT_GREATER_THAN_INT16((threshold), (actual), __LINE__, \
839 (message))
840#define TEST_ASSERT_GREATER_THAN_INT32_MESSAGE(threshold, actual, message) \
841 UNITY_TEST_ASSERT_GREATER_THAN_INT32((threshold), (actual), __LINE__, \
842 (message))
843#define TEST_ASSERT_GREATER_THAN_INT64_MESSAGE(threshold, actual, message) \
844 UNITY_TEST_ASSERT_GREATER_THAN_INT64((threshold), (actual), __LINE__, \
845 (message))
846#define TEST_ASSERT_GREATER_THAN_UINT_MESSAGE(threshold, actual, message) \
847 UNITY_TEST_ASSERT_GREATER_THAN_UINT((threshold), (actual), __LINE__, \
848 (message))
849#define TEST_ASSERT_GREATER_THAN_UINT8_MESSAGE(threshold, actual, message) \
850 UNITY_TEST_ASSERT_GREATER_THAN_UINT8((threshold), (actual), __LINE__, \
851 (message))
852#define TEST_ASSERT_GREATER_THAN_UINT16_MESSAGE(threshold, actual, message) \
853 UNITY_TEST_ASSERT_GREATER_THAN_UINT16((threshold), (actual), __LINE__, \
854 (message))
855#define TEST_ASSERT_GREATER_THAN_UINT32_MESSAGE(threshold, actual, message) \
856 UNITY_TEST_ASSERT_GREATER_THAN_UINT32((threshold), (actual), __LINE__, \
857 (message))
858#define TEST_ASSERT_GREATER_THAN_UINT64_MESSAGE(threshold, actual, message) \
859 UNITY_TEST_ASSERT_GREATER_THAN_UINT64((threshold), (actual), __LINE__, \
860 (message))
861#define TEST_ASSERT_GREATER_THAN_size_t_MESSAGE(threshold, actual, message) \
862 UNITY_TEST_ASSERT_GREATER_THAN_UINT((threshold), (actual), __LINE__, \
863 (message))
864#define TEST_ASSERT_GREATER_THAN_HEX8_MESSAGE(threshold, actual, message) \
865 UNITY_TEST_ASSERT_GREATER_THAN_HEX8((threshold), (actual), __LINE__, \
866 (message))
867#define TEST_ASSERT_GREATER_THAN_HEX16_MESSAGE(threshold, actual, message) \
868 UNITY_TEST_ASSERT_GREATER_THAN_HEX16((threshold), (actual), __LINE__, \
869 (message))
870#define TEST_ASSERT_GREATER_THAN_HEX32_MESSAGE(threshold, actual, message) \
871 UNITY_TEST_ASSERT_GREATER_THAN_HEX32((threshold), (actual), __LINE__, \
872 (message))
873#define TEST_ASSERT_GREATER_THAN_HEX64_MESSAGE(threshold, actual, message) \
874 UNITY_TEST_ASSERT_GREATER_THAN_HEX64((threshold), (actual), __LINE__, \
875 (message))
876#define TEST_ASSERT_GREATER_THAN_CHAR_MESSAGE(threshold, actual, message) \
877 UNITY_TEST_ASSERT_GREATER_THAN_CHAR((threshold), (actual), __LINE__, \
878 (message))
879
880#define TEST_ASSERT_LESS_THAN_MESSAGE(threshold, actual, message) \
881 UNITY_TEST_ASSERT_SMALLER_THAN_INT((threshold), (actual), __LINE__, (message))
882#define TEST_ASSERT_LESS_THAN_INT_MESSAGE(threshold, actual, message) \
883 UNITY_TEST_ASSERT_SMALLER_THAN_INT((threshold), (actual), __LINE__, (message))
884#define TEST_ASSERT_LESS_THAN_INT8_MESSAGE(threshold, actual, message) \
885 UNITY_TEST_ASSERT_SMALLER_THAN_INT8((threshold), (actual), __LINE__, \
886 (message))
887#define TEST_ASSERT_LESS_THAN_INT16_MESSAGE(threshold, actual, message) \
888 UNITY_TEST_ASSERT_SMALLER_THAN_INT16((threshold), (actual), __LINE__, \
889 (message))
890#define TEST_ASSERT_LESS_THAN_INT32_MESSAGE(threshold, actual, message) \
891 UNITY_TEST_ASSERT_SMALLER_THAN_INT32((threshold), (actual), __LINE__, \
892 (message))
893#define TEST_ASSERT_LESS_THAN_INT64_MESSAGE(threshold, actual, message) \
894 UNITY_TEST_ASSERT_SMALLER_THAN_INT64((threshold), (actual), __LINE__, \
895 (message))
896#define TEST_ASSERT_LESS_THAN_UINT_MESSAGE(threshold, actual, message) \
897 UNITY_TEST_ASSERT_SMALLER_THAN_UINT((threshold), (actual), __LINE__, \
898 (message))
899#define TEST_ASSERT_LESS_THAN_UINT8_MESSAGE(threshold, actual, message) \
900 UNITY_TEST_ASSERT_SMALLER_THAN_UINT8((threshold), (actual), __LINE__, \
901 (message))
902#define TEST_ASSERT_LESS_THAN_UINT16_MESSAGE(threshold, actual, message) \
903 UNITY_TEST_ASSERT_SMALLER_THAN_UINT16((threshold), (actual), __LINE__, \
904 (message))
905#define TEST_ASSERT_LESS_THAN_UINT32_MESSAGE(threshold, actual, message) \
906 UNITY_TEST_ASSERT_SMALLER_THAN_UINT32((threshold), (actual), __LINE__, \
907 (message))
908#define TEST_ASSERT_LESS_THAN_UINT64_MESSAGE(threshold, actual, message) \
909 UNITY_TEST_ASSERT_SMALLER_THAN_UINT64((threshold), (actual), __LINE__, \
910 (message))
911#define TEST_ASSERT_LESS_THAN_size_t_MESSAGE(threshold, actual, message) \
912 UNITY_TEST_ASSERT_SMALLER_THAN_UINT((threshold), (actual), __LINE__, \
913 (message))
914#define TEST_ASSERT_LESS_THAN_HEX8_MESSAGE(threshold, actual, message) \
915 UNITY_TEST_ASSERT_SMALLER_THAN_HEX8((threshold), (actual), __LINE__, \
916 (message))
917#define TEST_ASSERT_LESS_THAN_HEX16_MESSAGE(threshold, actual, message) \
918 UNITY_TEST_ASSERT_SMALLER_THAN_HEX16((threshold), (actual), __LINE__, \
919 (message))
920#define TEST_ASSERT_LESS_THAN_HEX32_MESSAGE(threshold, actual, message) \
921 UNITY_TEST_ASSERT_SMALLER_THAN_HEX32((threshold), (actual), __LINE__, \
922 (message))
923#define TEST_ASSERT_LESS_THAN_HEX64_MESSAGE(threshold, actual, message) \
924 UNITY_TEST_ASSERT_SMALLER_THAN_HEX64((threshold), (actual), __LINE__, \
925 (message))
926#define TEST_ASSERT_LESS_THAN_CHAR_MESSAGE(threshold, actual, message) \
927 UNITY_TEST_ASSERT_SMALLER_THAN_CHAR((threshold), (actual), __LINE__, \
928 (message))
929
930#define TEST_ASSERT_GREATER_OR_EQUAL_MESSAGE(threshold, actual, message) \
931 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT((threshold), (actual), __LINE__, \
932 (message))
933#define TEST_ASSERT_GREATER_OR_EQUAL_INT_MESSAGE(threshold, actual, message) \
934 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT((threshold), (actual), __LINE__, \
935 (message))
936#define TEST_ASSERT_GREATER_OR_EQUAL_INT8_MESSAGE(threshold, actual, message) \
937 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT8((threshold), (actual), __LINE__, \
938 (message))
939#define TEST_ASSERT_GREATER_OR_EQUAL_INT16_MESSAGE(threshold, actual, message) \
940 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT16((threshold), (actual), __LINE__, \
941 (message))
942#define TEST_ASSERT_GREATER_OR_EQUAL_INT32_MESSAGE(threshold, actual, message) \
943 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT32((threshold), (actual), __LINE__, \
944 (message))
945#define TEST_ASSERT_GREATER_OR_EQUAL_INT64_MESSAGE(threshold, actual, message) \
946 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_INT64((threshold), (actual), __LINE__, \
947 (message))
948#define TEST_ASSERT_GREATER_OR_EQUAL_UINT_MESSAGE(threshold, actual, message) \
949 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT((threshold), (actual), __LINE__, \
950 (message))
951#define TEST_ASSERT_GREATER_OR_EQUAL_UINT8_MESSAGE(threshold, actual, message) \
952 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT8((threshold), (actual), __LINE__, \
953 (message))
954#define TEST_ASSERT_GREATER_OR_EQUAL_UINT16_MESSAGE(threshold, actual, \
955 message) \
956 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT16((threshold), (actual), __LINE__, \
957 (message))
958#define TEST_ASSERT_GREATER_OR_EQUAL_UINT32_MESSAGE(threshold, actual, \
959 message) \
960 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT32((threshold), (actual), __LINE__, \
961 (message))
962#define TEST_ASSERT_GREATER_OR_EQUAL_UINT64_MESSAGE(threshold, actual, \
963 message) \
964 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT64((threshold), (actual), __LINE__, \
965 (message))
966#define TEST_ASSERT_GREATER_OR_EQUAL_size_t_MESSAGE(threshold, actual, \
967 message) \
968 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_UINT((threshold), (actual), __LINE__, \
969 (message))
970#define TEST_ASSERT_GREATER_OR_EQUAL_HEX8_MESSAGE(threshold, actual, message) \
971 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX8((threshold), (actual), __LINE__, \
972 (message))
973#define TEST_ASSERT_GREATER_OR_EQUAL_HEX16_MESSAGE(threshold, actual, message) \
974 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX16((threshold), (actual), __LINE__, \
975 (message))
976#define TEST_ASSERT_GREATER_OR_EQUAL_HEX32_MESSAGE(threshold, actual, message) \
977 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX32((threshold), (actual), __LINE__, \
978 (message))
979#define TEST_ASSERT_GREATER_OR_EQUAL_HEX64_MESSAGE(threshold, actual, message) \
980 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_HEX64((threshold), (actual), __LINE__, \
981 (message))
982#define TEST_ASSERT_GREATER_OR_EQUAL_CHAR_MESSAGE(threshold, actual, message) \
983 UNITY_TEST_ASSERT_GREATER_OR_EQUAL_CHAR((threshold), (actual), __LINE__, \
984 (message))
985
986#define TEST_ASSERT_LESS_OR_EQUAL_MESSAGE(threshold, actual, message) \
987 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT((threshold), (actual), __LINE__, \
988 (message))
989#define TEST_ASSERT_LESS_OR_EQUAL_INT_MESSAGE(threshold, actual, message) \
990 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT((threshold), (actual), __LINE__, \
991 (message))
992#define TEST_ASSERT_LESS_OR_EQUAL_INT8_MESSAGE(threshold, actual, message) \
993 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT8((threshold), (actual), __LINE__, \
994 (message))
995#define TEST_ASSERT_LESS_OR_EQUAL_INT16_MESSAGE(threshold, actual, message) \
996 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT16((threshold), (actual), __LINE__, \
997 (message))
998#define TEST_ASSERT_LESS_OR_EQUAL_INT32_MESSAGE(threshold, actual, message) \
999 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT32((threshold), (actual), __LINE__, \
1000 (message))
1001#define TEST_ASSERT_LESS_OR_EQUAL_INT64_MESSAGE(threshold, actual, message) \
1002 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_INT64((threshold), (actual), __LINE__, \
1003 (message))
1004#define TEST_ASSERT_LESS_OR_EQUAL_UINT_MESSAGE(threshold, actual, message) \
1005 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT((threshold), (actual), __LINE__, \
1006 (message))
1007#define TEST_ASSERT_LESS_OR_EQUAL_UINT8_MESSAGE(threshold, actual, message) \
1008 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT8((threshold), (actual), __LINE__, \
1009 (message))
1010#define TEST_ASSERT_LESS_OR_EQUAL_UINT16_MESSAGE(threshold, actual, message) \
1011 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT16((threshold), (actual), __LINE__, \
1012 (message))
1013#define TEST_ASSERT_LESS_OR_EQUAL_UINT32_MESSAGE(threshold, actual, message) \
1014 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT32((threshold), (actual), __LINE__, \
1015 (message))
1016#define TEST_ASSERT_LESS_OR_EQUAL_UINT64_MESSAGE(threshold, actual, message) \
1017 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT64((threshold), (actual), __LINE__, \
1018 (message))
1019#define TEST_ASSERT_LESS_OR_EQUAL_size_t_MESSAGE(threshold, actual, message) \
1020 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_UINT((threshold), (actual), __LINE__, \
1021 (message))
1022#define TEST_ASSERT_LESS_OR_EQUAL_HEX8_MESSAGE(threshold, actual, message) \
1023 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX8((threshold), (actual), __LINE__, \
1024 (message))
1025#define TEST_ASSERT_LESS_OR_EQUAL_HEX16_MESSAGE(threshold, actual, message) \
1026 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX16((threshold), (actual), __LINE__, \
1027 (message))
1028#define TEST_ASSERT_LESS_OR_EQUAL_HEX32_MESSAGE(threshold, actual, message) \
1029 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX32((threshold), (actual), __LINE__, \
1030 (message))
1031#define TEST_ASSERT_LESS_OR_EQUAL_HEX64_MESSAGE(threshold, actual, message) \
1032 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_HEX64((threshold), (actual), __LINE__, \
1033 (message))
1034#define TEST_ASSERT_LESS_OR_EQUAL_CHAR_MESSAGE(threshold, actual, message) \
1035 UNITY_TEST_ASSERT_SMALLER_OR_EQUAL_CHAR((threshold), (actual), __LINE__, \
1036 (message))
1037
1038/* Integer Ranges (of all sizes) */
1039#define TEST_ASSERT_INT_WITHIN_MESSAGE(delta, expected, actual, message) \
1040 UNITY_TEST_ASSERT_INT_WITHIN((delta), (expected), (actual), __LINE__, \
1041 (message))
1042#define TEST_ASSERT_INT8_WITHIN_MESSAGE(delta, expected, actual, message) \
1043 UNITY_TEST_ASSERT_INT8_WITHIN((delta), (expected), (actual), __LINE__, \
1044 (message))
1045#define TEST_ASSERT_INT16_WITHIN_MESSAGE(delta, expected, actual, message) \
1046 UNITY_TEST_ASSERT_INT16_WITHIN((delta), (expected), (actual), __LINE__, \
1047 (message))
1048#define TEST_ASSERT_INT32_WITHIN_MESSAGE(delta, expected, actual, message) \
1049 UNITY_TEST_ASSERT_INT32_WITHIN((delta), (expected), (actual), __LINE__, \
1050 (message))
1051#define TEST_ASSERT_INT64_WITHIN_MESSAGE(delta, expected, actual, message) \
1052 UNITY_TEST_ASSERT_INT64_WITHIN((delta), (expected), (actual), __LINE__, \
1053 (message))
1054#define TEST_ASSERT_UINT_WITHIN_MESSAGE(delta, expected, actual, message) \
1055 UNITY_TEST_ASSERT_UINT_WITHIN((delta), (expected), (actual), __LINE__, \
1056 (message))
1057#define TEST_ASSERT_UINT8_WITHIN_MESSAGE(delta, expected, actual, message) \
1058 UNITY_TEST_ASSERT_UINT8_WITHIN((delta), (expected), (actual), __LINE__, \
1059 (message))
1060#define TEST_ASSERT_UINT16_WITHIN_MESSAGE(delta, expected, actual, message) \
1061 UNITY_TEST_ASSERT_UINT16_WITHIN((delta), (expected), (actual), __LINE__, \
1062 (message))
1063#define TEST_ASSERT_UINT32_WITHIN_MESSAGE(delta, expected, actual, message) \
1064 UNITY_TEST_ASSERT_UINT32_WITHIN((delta), (expected), (actual), __LINE__, \
1065 (message))
1066#define TEST_ASSERT_UINT64_WITHIN_MESSAGE(delta, expected, actual, message) \
1067 UNITY_TEST_ASSERT_UINT64_WITHIN((delta), (expected), (actual), __LINE__, \
1068 (message))
1069#define TEST_ASSERT_size_t_WITHIN_MESSAGE(delta, expected, actual, message) \
1070 UNITY_TEST_ASSERT_UINT_WITHIN((delta), (expected), (actual), __LINE__, \
1071 (message))
1072#define TEST_ASSERT_HEX_WITHIN_MESSAGE(delta, expected, actual, message) \
1073 UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, \
1074 (message))
1075#define TEST_ASSERT_HEX8_WITHIN_MESSAGE(delta, expected, actual, message) \
1076 UNITY_TEST_ASSERT_HEX8_WITHIN((delta), (expected), (actual), __LINE__, \
1077 (message))
1078#define TEST_ASSERT_HEX16_WITHIN_MESSAGE(delta, expected, actual, message) \
1079 UNITY_TEST_ASSERT_HEX16_WITHIN((delta), (expected), (actual), __LINE__, \
1080 (message))
1081#define TEST_ASSERT_HEX32_WITHIN_MESSAGE(delta, expected, actual, message) \
1082 UNITY_TEST_ASSERT_HEX32_WITHIN((delta), (expected), (actual), __LINE__, \
1083 (message))
1084#define TEST_ASSERT_HEX64_WITHIN_MESSAGE(delta, expected, actual, message) \
1085 UNITY_TEST_ASSERT_HEX64_WITHIN((delta), (expected), (actual), __LINE__, \
1086 (message))
1087#define TEST_ASSERT_CHAR_WITHIN_MESSAGE(delta, expected, actual, message) \
1088 UNITY_TEST_ASSERT_CHAR_WITHIN((delta), (expected), (actual), __LINE__, \
1089 (message))
1090
1091/* Integer Array Ranges (of all sizes) */
1092#define TEST_ASSERT_INT_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1093 num_elements, message) \
1094 UNITY_TEST_ASSERT_INT_ARRAY_WITHIN((delta), (expected), (actual), \
1095 num_elements, __LINE__, (message))
1096#define TEST_ASSERT_INT8_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1097 num_elements, message) \
1098 UNITY_TEST_ASSERT_INT8_ARRAY_WITHIN((delta), (expected), (actual), \
1099 num_elements, __LINE__, (message))
1100#define TEST_ASSERT_INT16_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1101 num_elements, message) \
1102 UNITY_TEST_ASSERT_INT16_ARRAY_WITHIN((delta), (expected), (actual), \
1103 num_elements, __LINE__, (message))
1104#define TEST_ASSERT_INT32_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1105 num_elements, message) \
1106 UNITY_TEST_ASSERT_INT32_ARRAY_WITHIN((delta), (expected), (actual), \
1107 num_elements, __LINE__, (message))
1108#define TEST_ASSERT_INT64_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1109 num_elements, message) \
1110 UNITY_TEST_ASSERT_INT64_ARRAY_WITHIN((delta), (expected), (actual), \
1111 num_elements, __LINE__, (message))
1112#define TEST_ASSERT_UINT_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1113 num_elements, message) \
1114 UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN((delta), (expected), (actual), \
1115 num_elements, __LINE__, (message))
1116#define TEST_ASSERT_UINT8_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1117 num_elements, message) \
1118 UNITY_TEST_ASSERT_UINT8_ARRAY_WITHIN((delta), (expected), (actual), \
1119 num_elements, __LINE__, (message))
1120#define TEST_ASSERT_UINT16_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1121 num_elements, message) \
1122 UNITY_TEST_ASSERT_UINT16_ARRAY_WITHIN((delta), (expected), (actual), \
1123 num_elements, __LINE__, (message))
1124#define TEST_ASSERT_UINT32_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1125 num_elements, message) \
1126 UNITY_TEST_ASSERT_UINT32_ARRAY_WITHIN((delta), (expected), (actual), \
1127 num_elements, __LINE__, (message))
1128#define TEST_ASSERT_UINT64_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1129 num_elements, message) \
1130 UNITY_TEST_ASSERT_UINT64_ARRAY_WITHIN((delta), (expected), (actual), \
1131 num_elements, __LINE__, (message))
1132#define TEST_ASSERT_size_t_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1133 num_elements, message) \
1134 UNITY_TEST_ASSERT_UINT_ARRAY_WITHIN((delta), (expected), (actual), \
1135 num_elements, __LINE__, (message))
1136#define TEST_ASSERT_HEX_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1137 num_elements, message) \
1138 UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN((delta), (expected), (actual), \
1139 num_elements, __LINE__, (message))
1140#define TEST_ASSERT_HEX8_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1141 num_elements, message) \
1142 UNITY_TEST_ASSERT_HEX8_ARRAY_WITHIN((delta), (expected), (actual), \
1143 num_elements, __LINE__, (message))
1144#define TEST_ASSERT_HEX16_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1145 num_elements, message) \
1146 UNITY_TEST_ASSERT_HEX16_ARRAY_WITHIN((delta), (expected), (actual), \
1147 num_elements, __LINE__, (message))
1148#define TEST_ASSERT_HEX32_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1149 num_elements, message) \
1150 UNITY_TEST_ASSERT_HEX32_ARRAY_WITHIN((delta), (expected), (actual), \
1151 num_elements, __LINE__, (message))
1152#define TEST_ASSERT_HEX64_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1153 num_elements, message) \
1154 UNITY_TEST_ASSERT_HEX64_ARRAY_WITHIN((delta), (expected), (actual), \
1155 num_elements, __LINE__, (message))
1156#define TEST_ASSERT_CHAR_ARRAY_WITHIN_MESSAGE(delta, expected, actual, \
1157 num_elements, message) \
1158 UNITY_TEST_ASSERT_CHAR_ARRAY_WITHIN((delta), (expected), (actual), \
1159 num_elements, __LINE__, (message))
1160
1161/* Structs and Strings */
1162#define TEST_ASSERT_EQUAL_PTR_MESSAGE(expected, actual, message) \
1163 UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, (message))
1164#define TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message) \
1165 UNITY_TEST_ASSERT_EQUAL_STRING((expected), (actual), __LINE__, (message))
1166#define TEST_ASSERT_EQUAL_STRING_LEN_MESSAGE(expected, actual, len, message) \
1167 UNITY_TEST_ASSERT_EQUAL_STRING_LEN((expected), (actual), (len), __LINE__, \
1168 (message))
1169#define TEST_ASSERT_EQUAL_MEMORY_MESSAGE(expected, actual, len, message) \
1170 UNITY_TEST_ASSERT_EQUAL_MEMORY((expected), (actual), (len), __LINE__, \
1171 (message))
1172
1173/* Arrays */
1174#define TEST_ASSERT_EQUAL_INT_ARRAY_MESSAGE(expected, actual, num_elements, \
1175 message) \
1176 UNITY_TEST_ASSERT_EQUAL_INT_ARRAY((expected), (actual), (num_elements), \
1177 __LINE__, (message))
1178#define TEST_ASSERT_EQUAL_INT8_ARRAY_MESSAGE(expected, actual, num_elements, \
1179 message) \
1180 UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY((expected), (actual), (num_elements), \
1181 __LINE__, (message))
1182#define TEST_ASSERT_EQUAL_INT16_ARRAY_MESSAGE(expected, actual, num_elements, \
1183 message) \
1184 UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY((expected), (actual), (num_elements), \
1185 __LINE__, (message))
1186#define TEST_ASSERT_EQUAL_INT32_ARRAY_MESSAGE(expected, actual, num_elements, \
1187 message) \
1188 UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY((expected), (actual), (num_elements), \
1189 __LINE__, (message))
1190#define TEST_ASSERT_EQUAL_INT64_ARRAY_MESSAGE(expected, actual, num_elements, \
1191 message) \
1192 UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY((expected), (actual), (num_elements), \
1193 __LINE__, (message))
1194#define TEST_ASSERT_EQUAL_UINT_ARRAY_MESSAGE(expected, actual, num_elements, \
1195 message) \
1196 UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY((expected), (actual), (num_elements), \
1197 __LINE__, (message))
1198#define TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(expected, actual, num_elements, \
1199 message) \
1200 UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY((expected), (actual), (num_elements), \
1201 __LINE__, (message))
1202#define TEST_ASSERT_EQUAL_UINT16_ARRAY_MESSAGE(expected, actual, num_elements, \
1203 message) \
1204 UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY((expected), (actual), (num_elements), \
1205 __LINE__, (message))
1206#define TEST_ASSERT_EQUAL_UINT32_ARRAY_MESSAGE(expected, actual, num_elements, \
1207 message) \
1208 UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY((expected), (actual), (num_elements), \
1209 __LINE__, (message))
1210#define TEST_ASSERT_EQUAL_UINT64_ARRAY_MESSAGE(expected, actual, num_elements, \
1211 message) \
1212 UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY((expected), (actual), (num_elements), \
1213 __LINE__, (message))
1214#define TEST_ASSERT_EQUAL_size_t_ARRAY_MESSAGE(expected, actual, num_elements, \
1215 message) \
1216 UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY((expected), (actual), (num_elements), \
1217 __LINE__, (message))
1218#define TEST_ASSERT_EQUAL_HEX_ARRAY_MESSAGE(expected, actual, num_elements, \
1219 message) \
1220 UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY((expected), (actual), (num_elements), \
1221 __LINE__, (message))
1222#define TEST_ASSERT_EQUAL_HEX8_ARRAY_MESSAGE(expected, actual, num_elements, \
1223 message) \
1224 UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY((expected), (actual), (num_elements), \
1225 __LINE__, (message))
1226#define TEST_ASSERT_EQUAL_HEX16_ARRAY_MESSAGE(expected, actual, num_elements, \
1227 message) \
1228 UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY((expected), (actual), (num_elements), \
1229 __LINE__, (message))
1230#define TEST_ASSERT_EQUAL_HEX32_ARRAY_MESSAGE(expected, actual, num_elements, \
1231 message) \
1232 UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY((expected), (actual), (num_elements), \
1233 __LINE__, (message))
1234#define TEST_ASSERT_EQUAL_HEX64_ARRAY_MESSAGE(expected, actual, num_elements, \
1235 message) \
1236 UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY((expected), (actual), (num_elements), \
1237 __LINE__, (message))
1238#define TEST_ASSERT_EQUAL_PTR_ARRAY_MESSAGE(expected, actual, num_elements, \
1239 message) \
1240 UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY((expected), (actual), (num_elements), \
1241 __LINE__, (message))
1242#define TEST_ASSERT_EQUAL_STRING_ARRAY_MESSAGE(expected, actual, num_elements, \
1243 message) \
1244 UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY((expected), (actual), (num_elements), \
1245 __LINE__, (message))
1246#define TEST_ASSERT_EQUAL_MEMORY_ARRAY_MESSAGE(expected, actual, len, \
1247 num_elements, message) \
1248 UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((expected), (actual), (len), \
1249 (num_elements), __LINE__, (message))
1250#define TEST_ASSERT_EQUAL_CHAR_ARRAY_MESSAGE(expected, actual, num_elements, \
1251 message) \
1252 UNITY_TEST_ASSERT_EQUAL_CHAR_ARRAY((expected), (actual), (num_elements), \
1253 __LINE__, (message))
1254
1255/* Arrays Compared To Single Value*/
1256#define TEST_ASSERT_EACH_EQUAL_INT_MESSAGE(expected, actual, num_elements, \
1257 message) \
1258 UNITY_TEST_ASSERT_EACH_EQUAL_INT((expected), (actual), (num_elements), \
1259 __LINE__, (message))
1260#define TEST_ASSERT_EACH_EQUAL_INT8_MESSAGE(expected, actual, num_elements, \
1261 message) \
1262 UNITY_TEST_ASSERT_EACH_EQUAL_INT8((expected), (actual), (num_elements), \
1263 __LINE__, (message))
1264#define TEST_ASSERT_EACH_EQUAL_INT16_MESSAGE(expected, actual, num_elements, \
1265 message) \
1266 UNITY_TEST_ASSERT_EACH_EQUAL_INT16((expected), (actual), (num_elements), \
1267 __LINE__, (message))
1268#define TEST_ASSERT_EACH_EQUAL_INT32_MESSAGE(expected, actual, num_elements, \
1269 message) \
1270 UNITY_TEST_ASSERT_EACH_EQUAL_INT32((expected), (actual), (num_elements), \
1271 __LINE__, (message))
1272#define TEST_ASSERT_EACH_EQUAL_INT64_MESSAGE(expected, actual, num_elements, \
1273 message) \
1274 UNITY_TEST_ASSERT_EACH_EQUAL_INT64((expected), (actual), (num_elements), \
1275 __LINE__, (message))
1276#define TEST_ASSERT_EACH_EQUAL_UINT_MESSAGE(expected, actual, num_elements, \
1277 message) \
1278 UNITY_TEST_ASSERT_EACH_EQUAL_UINT((expected), (actual), (num_elements), \
1279 __LINE__, (message))
1280#define TEST_ASSERT_EACH_EQUAL_UINT8_MESSAGE(expected, actual, num_elements, \
1281 message) \
1282 UNITY_TEST_ASSERT_EACH_EQUAL_UINT8((expected), (actual), (num_elements), \
1283 __LINE__, (message))
1284#define TEST_ASSERT_EACH_EQUAL_UINT16_MESSAGE(expected, actual, num_elements, \
1285 message) \
1286 UNITY_TEST_ASSERT_EACH_EQUAL_UINT16((expected), (actual), (num_elements), \
1287 __LINE__, (message))
1288#define TEST_ASSERT_EACH_EQUAL_UINT32_MESSAGE(expected, actual, num_elements, \
1289 message) \
1290 UNITY_TEST_ASSERT_EACH_EQUAL_UINT32((expected), (actual), (num_elements), \
1291 __LINE__, (message))
1292#define TEST_ASSERT_EACH_EQUAL_UINT64_MESSAGE(expected, actual, num_elements, \
1293 message) \
1294 UNITY_TEST_ASSERT_EACH_EQUAL_UINT64((expected), (actual), (num_elements), \
1295 __LINE__, (message))
1296#define TEST_ASSERT_EACH_EQUAL_size_t_MESSAGE(expected, actual, num_elements, \
1297 message) \
1298 UNITY_TEST_ASSERT_EACH_EQUAL_UINT((expected), (actual), (num_elements), \
1299 __LINE__, (message))
1300#define TEST_ASSERT_EACH_EQUAL_HEX_MESSAGE(expected, actual, num_elements, \
1301 message) \
1302 UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), \
1303 __LINE__, (message))
1304#define TEST_ASSERT_EACH_EQUAL_HEX8_MESSAGE(expected, actual, num_elements, \
1305 message) \
1306 UNITY_TEST_ASSERT_EACH_EQUAL_HEX8((expected), (actual), (num_elements), \
1307 __LINE__, (message))
1308#define TEST_ASSERT_EACH_EQUAL_HEX16_MESSAGE(expected, actual, num_elements, \
1309 message) \
1310 UNITY_TEST_ASSERT_EACH_EQUAL_HEX16((expected), (actual), (num_elements), \
1311 __LINE__, (message))
1312#define TEST_ASSERT_EACH_EQUAL_HEX32_MESSAGE(expected, actual, num_elements, \
1313 message) \
1314 UNITY_TEST_ASSERT_EACH_EQUAL_HEX32((expected), (actual), (num_elements), \
1315 __LINE__, (message))
1316#define TEST_ASSERT_EACH_EQUAL_HEX64_MESSAGE(expected, actual, num_elements, \
1317 message) \
1318 UNITY_TEST_ASSERT_EACH_EQUAL_HEX64((expected), (actual), (num_elements), \
1319 __LINE__, (message))
1320#define TEST_ASSERT_EACH_EQUAL_PTR_MESSAGE(expected, actual, num_elements, \
1321 message) \
1322 UNITY_TEST_ASSERT_EACH_EQUAL_PTR((expected), (actual), (num_elements), \
1323 __LINE__, (message))
1324#define TEST_ASSERT_EACH_EQUAL_STRING_MESSAGE(expected, actual, num_elements, \
1325 message) \
1326 UNITY_TEST_ASSERT_EACH_EQUAL_STRING((expected), (actual), (num_elements), \
1327 __LINE__, (message))
1328#define TEST_ASSERT_EACH_EQUAL_MEMORY_MESSAGE(expected, actual, len, \
1329 num_elements, message) \
1330 UNITY_TEST_ASSERT_EACH_EQUAL_MEMORY((expected), (actual), (len), \
1331 (num_elements), __LINE__, (message))
1332#define TEST_ASSERT_EACH_EQUAL_CHAR_MESSAGE(expected, actual, num_elements, \
1333 message) \
1334 UNITY_TEST_ASSERT_EACH_EQUAL_CHAR((expected), (actual), (num_elements), \
1335 __LINE__, (message))
1336
1337/* Floating Point (If Enabled) */
1338#define TEST_ASSERT_FLOAT_WITHIN_MESSAGE(delta, expected, actual, message) \
1339 UNITY_TEST_ASSERT_FLOAT_WITHIN((delta), (expected), (actual), __LINE__, \
1340 (message))
1341#define TEST_ASSERT_EQUAL_FLOAT_MESSAGE(expected, actual, message) \
1342 UNITY_TEST_ASSERT_EQUAL_FLOAT((expected), (actual), __LINE__, (message))
1343#define TEST_ASSERT_EQUAL_FLOAT_ARRAY_MESSAGE(expected, actual, num_elements, \
1344 message) \
1345 UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY((expected), (actual), (num_elements), \
1346 __LINE__, (message))
1347#define TEST_ASSERT_EACH_EQUAL_FLOAT_MESSAGE(expected, actual, num_elements, \
1348 message) \
1349 UNITY_TEST_ASSERT_EACH_EQUAL_FLOAT((expected), (actual), (num_elements), \
1350 __LINE__, (message))
1351#define TEST_ASSERT_FLOAT_IS_INF_MESSAGE(actual, message) \
1352 UNITY_TEST_ASSERT_FLOAT_IS_INF((actual), __LINE__, (message))
1353#define TEST_ASSERT_FLOAT_IS_NEG_INF_MESSAGE(actual, message) \
1354 UNITY_TEST_ASSERT_FLOAT_IS_NEG_INF((actual), __LINE__, (message))
1355#define TEST_ASSERT_FLOAT_IS_NAN_MESSAGE(actual, message) \
1356 UNITY_TEST_ASSERT_FLOAT_IS_NAN((actual), __LINE__, (message))
1357#define TEST_ASSERT_FLOAT_IS_DETERMINATE_MESSAGE(actual, message) \
1358 UNITY_TEST_ASSERT_FLOAT_IS_DETERMINATE((actual), __LINE__, (message))
1359#define TEST_ASSERT_FLOAT_IS_NOT_INF_MESSAGE(actual, message) \
1360 UNITY_TEST_ASSERT_FLOAT_IS_NOT_INF((actual), __LINE__, (message))
1361#define TEST_ASSERT_FLOAT_IS_NOT_NEG_INF_MESSAGE(actual, message) \
1362 UNITY_TEST_ASSERT_FLOAT_IS_NOT_NEG_INF((actual), __LINE__, (message))
1363#define TEST_ASSERT_FLOAT_IS_NOT_NAN_MESSAGE(actual, message) \
1364 UNITY_TEST_ASSERT_FLOAT_IS_NOT_NAN((actual), __LINE__, (message))
1365#define TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE_MESSAGE(actual, message) \
1366 UNITY_TEST_ASSERT_FLOAT_IS_NOT_DETERMINATE((actual), __LINE__, (message))
1367
1368/* Double (If Enabled) */
1369#define TEST_ASSERT_DOUBLE_WITHIN_MESSAGE(delta, expected, actual, message) \
1370 UNITY_TEST_ASSERT_DOUBLE_WITHIN((delta), (expected), (actual), __LINE__, \
1371 (message))
1372#define TEST_ASSERT_EQUAL_DOUBLE_MESSAGE(expected, actual, message) \
1373 UNITY_TEST_ASSERT_EQUAL_DOUBLE((expected), (actual), __LINE__, (message))
1374#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY_MESSAGE(expected, actual, num_elements, \
1375 message) \
1376 UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY((expected), (actual), (num_elements), \
1377 __LINE__, (message))
1378#define TEST_ASSERT_EACH_EQUAL_DOUBLE_MESSAGE(expected, actual, num_elements, \
1379 message) \
1380 UNITY_TEST_ASSERT_EACH_EQUAL_DOUBLE((expected), (actual), (num_elements), \
1381 __LINE__, (message))
1382#define TEST_ASSERT_DOUBLE_IS_INF_MESSAGE(actual, message) \
1383 UNITY_TEST_ASSERT_DOUBLE_IS_INF((actual), __LINE__, (message))
1384#define TEST_ASSERT_DOUBLE_IS_NEG_INF_MESSAGE(actual, message) \
1385 UNITY_TEST_ASSERT_DOUBLE_IS_NEG_INF((actual), __LINE__, (message))
1386#define TEST_ASSERT_DOUBLE_IS_NAN_MESSAGE(actual, message) \
1387 UNITY_TEST_ASSERT_DOUBLE_IS_NAN((actual), __LINE__, (message))
1388#define TEST_ASSERT_DOUBLE_IS_DETERMINATE_MESSAGE(actual, message) \
1389 UNITY_TEST_ASSERT_DOUBLE_IS_DETERMINATE((actual), __LINE__, (message))
1390#define TEST_ASSERT_DOUBLE_IS_NOT_INF_MESSAGE(actual, message) \
1391 UNITY_TEST_ASSERT_DOUBLE_IS_NOT_INF((actual), __LINE__, (message))
1392#define TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF_MESSAGE(actual, message) \
1393 UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NEG_INF((actual), __LINE__, (message))
1394#define TEST_ASSERT_DOUBLE_IS_NOT_NAN_MESSAGE(actual, message) \
1395 UNITY_TEST_ASSERT_DOUBLE_IS_NOT_NAN((actual), __LINE__, (message))
1396#define TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE_MESSAGE(actual, message) \
1397 UNITY_TEST_ASSERT_DOUBLE_IS_NOT_DETERMINATE((actual), __LINE__, (message))
1398
1399/* Shorthand */
1400#ifdef UNITY_SHORTHAND_AS_OLD
1401#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) \
1402 UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, (message))
1403#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) \
1404 UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, (message))
1405#endif
1406#ifdef UNITY_SHORTHAND_AS_INT
1407#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) \
1408 UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, message)
1409#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) \
1410 UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
1411#endif
1412#ifdef UNITY_SHORTHAND_AS_MEM
1413#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) \
1414 UNITY_TEST_ASSERT_EQUAL_MEMORY((&expected), (&actual), sizeof(expected), \
1415 __LINE__, message)
1416#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) \
1417 UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
1418#endif
1419#ifdef UNITY_SHORTHAND_AS_RAW
1420#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) \
1421 UNITY_TEST_ASSERT(((expected) == (actual)), __LINE__, message)
1422#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) \
1423 UNITY_TEST_ASSERT(((expected) != (actual)), __LINE__, message)
1424#endif
1425#ifdef UNITY_SHORTHAND_AS_NONE
1426#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message) \
1427 UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
1428#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message) \
1429 UNITY_TEST_FAIL(__LINE__, UnityStrErrShorthand)
1430#endif
1431
1432/* end of UNITY_FRAMEWORK_H */
1433#ifdef __cplusplus
1434}
1435#endif
1436#endif