RTEMS
test.h
1 /*
2  * SPDX-License-Identifier: BSD-2-Clause
3  *
4  * Copyright (C) 2017, 2020 embedded brains GmbH
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25  * POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifndef THE_T_TEST_FRAMEWORK_H
29 #define THE_T_TEST_FRAMEWORK_H
30 
31 #include <stdarg.h>
32 #include <stdbool.h>
33 #include <stddef.h>
34 #include <stdint.h>
35 #include <string.h>
36 
37 #ifdef __rtems__
38 #include <rtems/score/cpu.h>
39 #endif
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif /* __cplusplus */
44 
55 typedef enum {
56  T_QUIET,
57  T_NORMAL,
58  T_VERBOSE
59 } T_verbosity;
60 
61 typedef struct T_fixture {
62  void (*setup)(void *);
63  void (*stop)(void *);
64  void (*teardown)(void *);
65  size_t (*scope)(void *, char *, size_t);
66  void *initial_context;
67 } T_fixture;
68 
69 typedef struct T_fixture_node {
70  struct T_fixture_node *next;
71  struct T_fixture_node *previous;
72  const T_fixture *fixture;
73  void *context;
74  unsigned int next_planned_steps;
75  unsigned int next_steps;
76  unsigned int failures;
78 
79 #define T_ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
80 
81 /*
82  * The __FILE__ includes the full file path from the command line. Enable the
83  * build system to give a sorter file name via a command line define.
84  */
85 #ifndef T_FILE_NAME
86 #define T_FILE_NAME __FILE__
87 #endif
88 
89 #if defined(__GNUC__) || __STDC_VERSION__ >= 199409L
90 #define T_ZERO_LENGTH_ARRAY
91 #define T_ZERO_LENGTH_ARRAY_EXTENSION(n) (n)
92 #else
93 #define T_ZERO_LENGTH_ARRAY 1
94 #define T_ZERO_LENGTH_ARRAY_EXTENSION(n) ((n) - 1)
95 #endif
96 
109 #ifdef __cplusplus
110 #define T_NO_RETURN [[ noreturn ]]
111 #else
112 #define T_NO_RETURN _Noreturn
113 #endif
114 
115 typedef struct T_case_context {
116  const char *name;
117  void (*body)(void);
118  const T_fixture *fixture;
119  const struct T_case_context *next;
121 
122 void T_case_register(T_case_context *);
123 
124 #define T_CHECK_STOP 1U
125 
126 #define T_CHECK_QUIET 2U
127 
128 /* If you change this value, you have to adjust T_VA_ARGS_KIND() as well */
129 #define T_CHECK_FMT 4U
130 
131 #define T_CHECK_STEP_FLAG 8U
132 
133 #define T_CHECK_STEP_TO_FLAGS(step) ((unsigned int)(step) << 8)
134 
135 #define T_CHECK_STEP_FROM_FLAGS(flags) ((flags) >> 8)
136 
137 #define T_CHECK_STEP(step) (T_CHECK_STEP_TO_FLAGS(step) | T_CHECK_STEP_FLAG)
138 
139 typedef struct {
140  const char *file;
141  int line;
142  unsigned int flags;
144 
145 typedef struct {
146  T_check_context base;
147  const char *msg;
149 
150 #define T_VA_ARGS_FIRST(...) T_VA_ARGS_FIRST_SELECT(__VA_ARGS__, throw_away)
151 #define T_VA_ARGS_FIRST_SELECT(first, ...) first
152 
153 /*
154  * The T_VA_ARGS_MORE() supports up to nine arguments. It expands to nothing
155  * if only one argument is given. It expands to a comma and the second and
156  * following arguments if at least two arguments are present. The 4U shall
157  * correspond to T_CHECK_FMT.
158  */
159 #define T_VA_ARGS_MORE(...) \
160  T_VA_ARGS_XEXPAND(T_VA_ARGS_KIND(__VA_ARGS__), __VA_ARGS__)
161 #define T_VA_ARGS_XEXPAND(kind, ...) T_VA_ARGS_EXPAND(kind, __VA_ARGS__)
162 #define T_VA_ARGS_EXPAND(kind, ...) T_VA_ARGS_EXPAND_##kind(__VA_ARGS__)
163 #define T_VA_ARGS_EXPAND_0U(first)
164 #define T_VA_ARGS_EXPAND_4U(first, ...) , __VA_ARGS__
165 #define T_VA_ARGS_KIND(...) \
166  T_VA_ARGS_SELECT(__VA_ARGS__, \
167  4U, 4U, 4U, 4U, 4U, 4U, 4U, 4U, 0U, throw_away)
168 #define T_VA_ARGS_SELECT(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, ...) a10
169 
170 void T_check(const T_check_context *, bool, ...);
171 
172 extern const T_check_context T_special;
173 
174 #define T_flags_true(flags, ...) \
175 { \
176  static const T_check_context T_check_instance = { \
177  T_FILE_NAME, __LINE__, \
178  (flags) | T_VA_ARGS_KIND(__VA_ARGS__) }; \
179  T_check(&T_check_instance, \
180  T_VA_ARGS_FIRST(__VA_ARGS__) T_VA_ARGS_MORE(__VA_ARGS__)); \
181 }
182 
183 #define T_flags_eq(flags, a, ...) \
184  T_flags_true(flags, \
185  (a) == (T_VA_ARGS_FIRST(__VA_ARGS__)) T_VA_ARGS_MORE(__VA_ARGS__))
186 
187 #define T_flags_ne(flags, a, ...) \
188  T_flags_true(flags, \
189  (a) != (T_VA_ARGS_FIRST(__VA_ARGS__)) T_VA_ARGS_MORE(__VA_ARGS__))
190 
191 void T_check_eq_ptr(const T_check_context_msg *, const void *, const void *);
192 
193 #define T_flags_eq_ptr(a, e, flags, sa, se) \
194 { \
195  static const T_check_context_msg T_check_instance = { \
196  { T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }, \
197  sa " == " se }; \
198  T_check_eq_ptr(&T_check_instance, a, e); \
199 }
200 
201 void T_check_ne_ptr(const T_check_context_msg *, const void *, const void *);
202 
203 #define T_flags_ne_ptr(a, e, flags, sa, se) \
204 { \
205  static const T_check_context_msg T_check_instance = { \
206  { T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }, \
207  sa " != " se }; \
208  T_check_ne_ptr(&T_check_instance, a, e); \
209 }
210 
211 void T_check_null(const T_check_context_msg *, const void *);
212 
213 #define T_flags_null(a, flags, sa) \
214 { \
215  static const T_check_context_msg T_check_instance = { \
216  { T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }, sa }; \
217  T_check_null(&T_check_instance, a); \
218 }
219 
220 void T_check_not_null(const T_check_context_msg *, const void *);
221 
222 #define T_flags_not_null(a, flags, sa) \
223 { \
224  static const T_check_context_msg T_check_instance = { \
225  { T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }, sa }; \
226  T_check_not_null(&T_check_instance, a); \
227 }
228 
229 void T_check_eq_mem(const T_check_context_msg *, const void *, const void *,
230  size_t);
231 
232 #define T_flags_eq_mem(a, e, n, flags, sa, se, sn) \
233 { \
234  static const T_check_context_msg T_check_instance = { \
235  { T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }, \
236  "memcmp(" sa ", " se ", " sn ") == 0" }; \
237  T_check_eq_mem(&T_check_instance, a, e, n); \
238 }
239 
240 void T_check_ne_mem(const T_check_context_msg *, const void *, const void *,
241  size_t);
242 
243 #define T_flags_ne_mem(a, e, n, flags, sa, se, sn) \
244 { \
245  static const T_check_context_msg T_check_instance = { \
246  { T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }, \
247  "memcmp(" sa ", " se ", " sn ") != 0" }; \
248  T_check_ne_mem(&T_check_instance, a, e, n); \
249 }
250 
251 void T_check_eq_str(const T_check_context *, const char *, const char *);
252 
253 #define T_flags_eq_str(a, e, flags) \
254 { \
255  static const T_check_context T_check_instance = { \
256  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
257  T_check_eq_str(&T_check_instance, a, e); \
258 }
259 
260 void T_check_ne_str(const T_check_context *, const char *, const char *);
261 
262 #define T_flags_ne_str(a, e, flags) \
263 { \
264  static const T_check_context T_check_instance = { \
265  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
266  T_check_ne_str(&T_check_instance, a, e); \
267 }
268 
269 void T_check_eq_nstr(const T_check_context *, const char *, const char *,
270  size_t);
271 
272 #define T_flags_eq_nstr(a, e, n, flags) \
273 { \
274  static const T_check_context T_check_instance = { \
275  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
276  T_check_eq_nstr(&T_check_instance, a, e, n); \
277 }
278 
279 void T_check_ne_nstr(const T_check_context *, const char *, const char *,
280  size_t);
281 
282 #define T_flags_ne_nstr(a, e, n, flags) \
283 { \
284  static const T_check_context T_check_instance = { \
285  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
286  T_check_ne_nstr(&T_check_instance, a, e, n); \
287 }
288 
289 void T_check_eq_char(const T_check_context *, char, char);
290 
291 #define T_flags_eq_char(a, e, flags) \
292 { \
293  static const T_check_context T_check_instance = { \
294  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
295  T_check_eq_char(&T_check_instance, a, e); \
296 }
297 
298 void T_check_ne_char(const T_check_context *, char, char);
299 
300 #define T_flags_ne_char(a, e, flags) \
301 { \
302  static const T_check_context T_check_instance = { \
303  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
304  T_check_ne_char(&T_check_instance, a, e); \
305 }
306 
307 void T_check_eq_int(const T_check_context *, int, int);
308 
309 #define T_flags_eq_int(a, e, flags) \
310 { \
311  static const T_check_context T_check_instance = { \
312  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
313  T_check_eq_int(&T_check_instance, a, e); \
314 }
315 
316 void T_check_ne_int(const T_check_context *, int, int);
317 
318 #define T_flags_ne_int(a, e, flags) \
319 { \
320  static const T_check_context T_check_instance = { \
321  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
322  T_check_ne_int(&T_check_instance, a, e); \
323 }
324 
325 void T_check_ge_int(const T_check_context *, int, int);
326 
327 #define T_flags_ge_int(a, e, flags) \
328 { \
329  static const T_check_context T_check_instance = { \
330  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
331  T_check_ge_int(&T_check_instance, a, e); \
332 }
333 
334 void T_check_gt_int(const T_check_context *, int, int);
335 
336 #define T_flags_gt_int(a, e, flags) \
337 { \
338  static const T_check_context T_check_instance = { \
339  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
340  T_check_gt_int(&T_check_instance, a, e); \
341 }
342 
343 void T_check_le_int(const T_check_context *, int, int);
344 
345 #define T_flags_le_int(a, e, flags) \
346 { \
347  static const T_check_context T_check_instance = { \
348  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
349  T_check_le_int(&T_check_instance, a, e); \
350 }
351 
352 void T_check_lt_int(const T_check_context *, int, int);
353 
354 #define T_flags_lt_int(a, e, flags) \
355 { \
356  static const T_check_context T_check_instance = { \
357  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
358  T_check_lt_int(&T_check_instance, a, e); \
359 }
360 
361 void T_check_eq_uint(const T_check_context *, unsigned int, unsigned int);
362 
363 #define T_flags_eq_uint(a, e, flags) \
364 { \
365  static const T_check_context T_check_instance = { \
366  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
367  T_check_eq_uint(&T_check_instance, a, e); \
368 }
369 
370 void T_check_ne_uint(const T_check_context *, unsigned int, unsigned int);
371 
372 #define T_flags_ne_uint(a, e, flags) \
373 { \
374  static const T_check_context T_check_instance = { \
375  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
376  T_check_ne_uint(&T_check_instance, a, e); \
377 }
378 
379 void T_check_ge_uint(const T_check_context *, unsigned int, unsigned int);
380 
381 #define T_flags_ge_uint(a, e, flags) \
382 { \
383  static const T_check_context T_check_instance = { \
384  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
385  T_check_ge_uint(&T_check_instance, a, e); \
386 }
387 
388 void T_check_gt_uint(const T_check_context *, unsigned int, unsigned int);
389 
390 #define T_flags_gt_uint(a, e, flags) \
391 { \
392  static const T_check_context T_check_instance = { \
393  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
394  T_check_gt_uint(&T_check_instance, a, e); \
395 }
396 
397 void T_check_le_uint(const T_check_context *, unsigned int, unsigned int);
398 
399 #define T_flags_le_uint(a, e, flags) \
400 { \
401  static const T_check_context T_check_instance = { \
402  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
403  T_check_le_uint(&T_check_instance, a, e); \
404 }
405 
406 void T_check_lt_uint(const T_check_context *, unsigned int, unsigned int);
407 
408 #define T_flags_lt_uint(a, e, flags) \
409 { \
410  static const T_check_context T_check_instance = { \
411  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
412  T_check_lt_uint(&T_check_instance, a, e); \
413 }
414 
415 void T_check_eq_long(const T_check_context *, long, long);
416 
417 #define T_flags_eq_long(a, e, flags) \
418 { \
419  static const T_check_context T_check_instance = { \
420  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
421  T_check_eq_long(&T_check_instance, a, e); \
422 }
423 
424 void T_check_ne_long(const T_check_context *, long, long);
425 
426 #define T_flags_ne_long(a, e, flags) \
427 { \
428  static const T_check_context T_check_instance = { \
429  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
430  T_check_ne_long(&T_check_instance, a, e); \
431 }
432 
433 void T_check_ge_long(const T_check_context *, long, long);
434 
435 #define T_flags_ge_long(a, e, flags) \
436 { \
437  static const T_check_context T_check_instance = { \
438  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
439  T_check_ge_long(&T_check_instance, a, e); \
440 }
441 
442 void T_check_gt_long(const T_check_context *, long, long);
443 
444 #define T_flags_gt_long(a, e, flags) \
445 { \
446  static const T_check_context T_check_instance = { \
447  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
448  T_check_gt_long(&T_check_instance, a, e); \
449 }
450 
451 void T_check_le_long(const T_check_context *, long, long);
452 
453 #define T_flags_le_long(a, e, flags) \
454 { \
455  static const T_check_context T_check_instance = { \
456  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
457  T_check_le_long(&T_check_instance, a, e); \
458 }
459 
460 void T_check_lt_long(const T_check_context *, long, long);
461 
462 #define T_flags_lt_long(a, e, flags) \
463 { \
464  static const T_check_context T_check_instance = { \
465  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
466  T_check_lt_long(&T_check_instance, a, e); \
467 }
468 
469 void T_check_eq_ulong(const T_check_context *, unsigned long, unsigned long);
470 
471 #define T_flags_eq_ulong(a, e, flags) \
472 { \
473  static const T_check_context T_check_instance = { \
474  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
475  T_check_eq_ulong(&T_check_instance, a, e); \
476 }
477 
478 void T_check_ne_ulong(const T_check_context *, unsigned long, unsigned long);
479 
480 #define T_flags_ne_ulong(a, e, flags) \
481 { \
482  static const T_check_context T_check_instance = { \
483  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
484  T_check_ne_ulong(&T_check_instance, a, e); \
485 }
486 
487 void T_check_ge_ulong(const T_check_context *, unsigned long, unsigned long);
488 
489 #define T_flags_ge_ulong(a, e, flags) \
490 { \
491  static const T_check_context T_check_instance = { \
492  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
493  T_check_ge_ulong(&T_check_instance, a, e); \
494 }
495 
496 void T_check_gt_ulong(const T_check_context *, unsigned long, unsigned long);
497 
498 #define T_flags_gt_ulong(a, e, flags) \
499 { \
500  static const T_check_context T_check_instance = { \
501  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
502  T_check_gt_ulong(&T_check_instance, a, e); \
503 }
504 
505 void T_check_le_ulong(const T_check_context *, unsigned long, unsigned long);
506 
507 #define T_flags_le_ulong(a, e, flags) \
508 { \
509  static const T_check_context T_check_instance = { \
510  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
511  T_check_le_ulong(&T_check_instance, a, e); \
512 }
513 
514 void T_check_lt_ulong(const T_check_context *, unsigned long, unsigned long);
515 
516 #define T_flags_lt_ulong(a, e, flags) \
517 { \
518  static const T_check_context T_check_instance = { \
519  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
520  T_check_lt_ulong(&T_check_instance, a, e); \
521 }
522 
523 void T_check_eq_ll(const T_check_context *, long long, long long);
524 
525 #define T_flags_eq_ll(a, e, flags) \
526 { \
527  static const T_check_context T_check_instance = { \
528  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
529  T_check_eq_ll(&T_check_instance, a, e); \
530 }
531 
532 void T_check_ne_ll(const T_check_context *, long long, long long);
533 
534 #define T_flags_ne_ll(a, e, flags) \
535 { \
536  static const T_check_context T_check_instance = { \
537  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
538  T_check_ne_ll(&T_check_instance, a, e); \
539 }
540 
541 void T_check_ge_ll(const T_check_context *, long long, long long);
542 
543 #define T_flags_ge_ll(a, e, flags) \
544 { \
545  static const T_check_context T_check_instance = { \
546  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
547  T_check_ge_ll(&T_check_instance, a, e); \
548 }
549 
550 void T_check_gt_ll(const T_check_context *, long long, long long);
551 
552 #define T_flags_gt_ll(a, e, flags) \
553 { \
554  static const T_check_context T_check_instance = { \
555  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
556  T_check_gt_ll(&T_check_instance, a, e); \
557 }
558 
559 void T_check_le_ll(const T_check_context *, long long, long long);
560 
561 #define T_flags_le_ll(a, e, flags) \
562 { \
563  static const T_check_context T_check_instance = { \
564  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
565  T_check_le_ll(&T_check_instance, a, e); \
566 }
567 
568 void T_check_lt_ll(const T_check_context *, long long, long long);
569 
570 #define T_flags_lt_ll(a, e, flags) \
571 { \
572  static const T_check_context T_check_instance = { \
573  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
574  T_check_lt_ll(&T_check_instance, a, e); \
575 }
576 
577 void T_check_eq_ull(const T_check_context *, unsigned long long,
578  unsigned long long);
579 
580 #define T_flags_eq_ull(a, e, flags) \
581 { \
582  static const T_check_context T_check_instance = { \
583  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
584  T_check_eq_ull(&T_check_instance, a, e); \
585 }
586 
587 void T_check_ne_ull(const T_check_context *, unsigned long long,
588  unsigned long long);
589 
590 #define T_flags_ne_ull(a, e, flags) \
591 { \
592  static const T_check_context T_check_instance = { \
593  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
594  T_check_ne_ull(&T_check_instance, a, e); \
595 }
596 
597 void T_check_ge_ull(const T_check_context *, unsigned long long,
598  unsigned long long);
599 
600 #define T_flags_ge_ull(a, e, flags) \
601 { \
602  static const T_check_context T_check_instance = { \
603  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
604  T_check_ge_ull(&T_check_instance, a, e); \
605 }
606 
607 void T_check_gt_ull(const T_check_context *, unsigned long long,
608  unsigned long long);
609 
610 #define T_flags_gt_ull(a, e, flags) \
611 { \
612  static const T_check_context T_check_instance = { \
613  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
614  T_check_gt_ull(&T_check_instance, a, e); \
615 }
616 
617 void T_check_le_ull(const T_check_context *, unsigned long long,
618  unsigned long long);
619 
620 #define T_flags_le_ull(a, e, flags) \
621 { \
622  static const T_check_context T_check_instance = { \
623  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
624  T_check_le_ull(&T_check_instance, a, e); \
625 }
626 
627 void T_check_lt_ull(const T_check_context *, unsigned long long,
628  unsigned long long);
629 
630 #define T_flags_lt_ull(a, e, flags) \
631 { \
632  static const T_check_context T_check_instance = { \
633  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
634  T_check_lt_ull(&T_check_instance, a, e); \
635 }
636 
637 void T_check_eno(const T_check_context *, int, int);
638 
639 #define T_flags_eno(a, e, flags) \
640 { \
641  static const T_check_context T_check_instance = { \
642  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
643  T_check_eno(&T_check_instance, a, e); \
644 }
645 
646 void T_check_eno_success(const T_check_context *, int);
647 
648 #define T_flags_eno_success(a, flags) \
649 { \
650  static const T_check_context T_check_instance = { \
651  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
652  T_check_eno_success(&T_check_instance, a); \
653 }
654 
655 void T_check_psx_error(const T_check_context *, int, int);
656 
657 #define T_flags_psx_error(a, eno, flags) \
658 { \
659  static const T_check_context T_check_instance = { \
660  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
661  T_check_psx_error(&T_check_instance, a, eno); \
662 }
663 
664 void T_check_psx_success(const T_check_context *, int);
665 
666 #define T_flags_psx_success(a, flags) \
667 { \
668  static const T_check_context T_check_instance = { \
669  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
670  T_check_psx_success(&T_check_instance, a); \
671 }
672 
675 int T_printf(char const *, ...);
676 
677 int T_vprintf(char const *, va_list);
678 
679 int T_puts(const char *, size_t);
680 
681 int T_snprintf(char *, size_t, const char *, ...);
682 
683 void T_log(T_verbosity, char const *, ...);
684 
685 const char *T_case_name(void);
686 
687 T_verbosity T_set_verbosity(T_verbosity);
688 
699 #define T_true(...) T_flags_true(0, __VA_ARGS__)
700 #define T_assert_true(...) T_flags_true(T_CHECK_STOP, __VA_ARGS__)
701 #define T_quiet_true(...) T_flags_true(T_CHECK_QUIET, __VA_ARGS__)
702 #define T_step_true(s, ...) T_flags_true(T_CHECK_STEP(s), __VA_ARGS__)
703 #define T_step_assert_true(s, ...) \
704  T_flags_true(T_CHECK_STEP(s) | T_CHECK_STOP, __VA_ARGS__)
705 
706 #define T_false(...) \
707  T_flags_true(0, \
708  !(T_VA_ARGS_FIRST(__VA_ARGS__)) T_VA_ARGS_MORE(__VA_ARGS__))
709 #define T_assert_false(...) \
710  T_flags_true(T_CHECK_STOP, \
711  !(T_VA_ARGS_FIRST(__VA_ARGS__)) T_VA_ARGS_MORE(__VA_ARGS__))
712 #define T_quiet_false(...) \
713  T_flags_true(T_CHECK_QUIET, \
714  !(T_VA_ARGS_FIRST(__VA_ARGS__)) T_VA_ARGS_MORE(__VA_ARGS__))
715 #define T_step_false(s, ...) \
716  T_flags_true(T_CHECK_STEP(s), \
717  !(T_VA_ARGS_FIRST(__VA_ARGS__)) T_VA_ARGS_MORE(__VA_ARGS__))
718 #define T_step_assert_false(s, ...) \
719  T_flags_true(T_CHECK_STEP(s) | T_CHECK_STOP, \
720  !(T_VA_ARGS_FIRST(__VA_ARGS__)) T_VA_ARGS_MORE(__VA_ARGS__))
721 
734 #define T_eq(a, ...) T_flags_eq(0, a, __VA_ARGS__)
735 #define T_assert_eq(a, ...) T_flags_eq(T_CHECK_STOP, a, __VA_ARGS__)
736 #define T_quiet_eq(a, ...) T_flags_eq(T_CHECK_QUIET, a, __VA_ARGS__)
737 #define T_step_eq(s, a, ...) T_flags_eq(T_CHECK_STEP(s), a, __VA_ARGS__)
738 #define T_step_assert_eq(s, a, ...) \
739  T_flags_eq(T_CHECK_STEP(s) | T_CHECK_STOP, a, __VA_ARGS__)
740 
741 #define T_ne(a, ...) T_flags_ne(0, a, __VA_ARGS__)
742 #define T_assert_ne(a, ...) T_flags_ne(T_CHECK_STOP, a, __VA_ARGS__)
743 #define T_quiet_ne(a, ...) T_flags_ne(T_CHECK_QUIET, a, __VA_ARGS__)
744 #define T_step_ne(s, a, ...) T_flags_ne(T_CHECK_STEP(s), a, __VA_ARGS__)
745 #define T_step_assert_ne(s, a, ...) \
746  T_flags_ne(T_CHECK_STEP(s) | T_CHECK_STOP, a, __VA_ARGS__)
747 
760 #define T_eq_ptr(a, e) T_flags_eq_ptr(a, e, 0, #a, #e)
761 #define T_assert_eq_ptr(a, e) T_flags_eq_ptr(a, e, T_CHECK_STOP, #a, #e)
762 #define T_quiet_eq_ptr(a, e) T_flags_eq_ptr(a, e, T_CHECK_QUIET, #a, #e)
763 #define T_step_eq_ptr(s, a, e) T_flags_eq_ptr(a, e, T_CHECK_STEP(s), #a, #e)
764 #define T_step_assert_eq_ptr(s, a, e) \
765  T_flags_eq_ptr(a, e, T_CHECK_STEP(s) | T_CHECK_STOP, #a, #e)
766 
767 #define T_ne_ptr(a, e) T_flags_ne_ptr(a, e, 0, #a, #e)
768 #define T_assert_ne_ptr(a, e) T_flags_ne_ptr(a, e, T_CHECK_STOP, #a, #e)
769 #define T_quiet_ne_ptr(a, e) T_flags_ne_ptr(a, e, T_CHECK_QUIET, #a, #e)
770 #define T_step_ne_ptr(s, a, e) T_flags_ne_ptr(a, e, T_CHECK_STEP(s), #a, #e)
771 #define T_step_assert_ne_ptr(s, a, e) \
772  T_flags_ne_ptr(a, e, T_CHECK_STEP(s) | T_CHECK_STOP, #a, #e)
773 
774 #define T_null(a) T_flags_null(a, 0, #a)
775 #define T_assert_null(a) T_flags_null(a, T_CHECK_STOP, #a)
776 #define T_quiet_null(a) T_flags_null(a, T_CHECK_QUIET, #a)
777 #define T_quiet_assert_null(a) \
778  T_flags_null(a, T_CHECK_QUIET | T_CHECK_STOP, #a)
779 #define T_step_null(s, a) T_flags_null(a, T_CHECK_STEP(s), #a)
780 #define T_step_assert_null(s, a) \
781  T_flags_null(a, T_CHECK_STEP(s) | T_CHECK_STOP, #a)
782 
783 #define T_not_null(a) T_flags_not_null(a, 0, #a)
784 #define T_assert_not_null(a) T_flags_not_null(a, T_CHECK_STOP, #a)
785 #define T_quiet_not_null(a) T_flags_not_null(a, T_CHECK_QUIET, #a)
786 #define T_quiet_assert_not_null(a) \
787  T_flags_not_null(a, T_CHECK_QUIET | T_CHECK_STOP, #a)
788 #define T_step_not_null(s, a) T_flags_not_null(a, T_CHECK_STEP(s), #a)
789 #define T_step_assert_not_null(s, a) \
790  T_flags_not_null(a, T_CHECK_STEP(s) | T_CHECK_STOP, #a)
791 
804 #define T_eq_mem(a, e, n) T_flags_eq_mem(a, e, n, 0, #a, #e, #n)
805 #define T_assert_eq_mem(a, e, n) \
806  T_flags_eq_mem(a, e, n, T_CHECK_STOP, #a, #e, #n)
807 #define T_quiet_eq_mem(a, e, n) \
808  T_flags_eq_mem(a, e, n, T_CHECK_QUIET, #a, #e, #n)
809 #define T_step_eq_mem(s, a, e, n) \
810  T_flags_eq_mem(a, e, n, T_CHECK_STEP(s), #a, #e, #n)
811 #define T_step_assert_eq_mem(s, a, e, n) \
812  T_flags_eq_mem(a, e, n, T_CHECK_STEP(s) | T_CHECK_STOP, #a, #e, #n)
813 
814 #define T_ne_mem(a, e, n) T_flags_ne_mem(a, e, n, 0, #a, #e, #n)
815 #define T_assert_ne_mem(a, e, n) \
816  T_flags_ne_mem(a, e, n, T_CHECK_STOP, #a, #e, #n)
817 #define T_quiet_ne_mem(a, e, n) \
818  T_flags_ne_mem(a, e, n, T_CHECK_QUIET, #a, #e, #n)
819 #define T_step_ne_mem(s, a, e, n) \
820  T_flags_ne_mem(a, e, n, T_CHECK_STEP(s), #a, #e, #n)
821 #define T_step_assert_ne_mem(s, a, e, n) \
822  T_flags_ne_mem(a, e, n, T_CHECK_STEP(s) | T_CHECK_STOP, #a, #e, #n)
823 
837 #define T_eq_str(a, e) T_flags_eq_str(a, e, 0)
838 #define T_assert_eq_str(a, e) T_flags_eq_str(a, e, T_CHECK_STOP)
839 #define T_quiet_eq_str(a, e) T_flags_eq_str(a, e, T_CHECK_QUIET)
840 #define T_step_eq_str(s, a, e) T_flags_eq_str(a, e, T_CHECK_STEP(s))
841 #define T_step_assert_eq_str(s, a, e) \
842  T_flags_eq_str(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
843 
844 #define T_ne_str(a, e) T_flags_ne_str(a, e, 0)
845 #define T_assert_ne_str(a, e) T_flags_ne_str(a, e, T_CHECK_STOP)
846 #define T_quiet_ne_str(a, e) T_flags_ne_str(a, e, T_CHECK_QUIET)
847 #define T_step_ne_str(s, a, e) T_flags_ne_str(a, e, T_CHECK_STEP(s))
848 #define T_step_assert_ne_str(s, a, e) \
849  T_flags_ne_str(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
850 
851 #define T_eq_nstr(a, e, n) T_flags_eq_nstr(a, e, n, 0)
852 #define T_assert_eq_nstr(a, e, n) T_flags_eq_nstr(a, e, n, T_CHECK_STOP)
853 #define T_quiet_eq_nstr(a, e, n) T_flags_eq_nstr(a, e, n, T_CHECK_QUIET)
854 #define T_step_eq_nstr(s, a, e, n) T_flags_eq_nstr(a, e, n, T_CHECK_STEP(s))
855 #define T_step_assert_eq_nstr(s, a, e, n) \
856  T_flags_eq_nstr(a, e, n, T_CHECK_STEP(s) | T_CHECK_STOP)
857 
858 #define T_ne_nstr(a, e, n) T_flags_ne_nstr(a, e, n, 0)
859 #define T_assert_ne_nstr(a, e, n) T_flags_ne_nstr(a, e, n, T_CHECK_STOP)
860 #define T_quiet_ne_nstr(a, e, n) T_flags_ne_nstr(a, e, n, T_CHECK_QUIET)
861 #define T_step_ne_nstr(s, a, e, n) T_flags_ne_nstr(a, e, n, T_CHECK_STEP(s))
862 #define T_step_assert_ne_nstr(s, a, e, n) \
863  T_flags_ne_nstr(a, e, n, T_CHECK_STEP(s) | T_CHECK_STOP)
864 
877 #define T_eq_char(a, e) T_flags_eq_char(a, e, 0)
878 #define T_assert_eq_char(a, e) T_flags_eq_char(a, e, T_CHECK_STOP)
879 #define T_quiet_eq_char(a, e) T_flags_eq_char(a, e, T_CHECK_QUIET)
880 #define T_step_eq_char(s, a, e) T_flags_eq_char(a, e, T_CHECK_STEP(s))
881 #define T_step_assert_eq_char(s, a, e) \
882  T_flags_eq_char(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
883 
884 #define T_ne_char(a, e) T_flags_ne_char(a, e, 0)
885 #define T_assert_ne_char(a, e) T_flags_ne_char(a, e, T_CHECK_STOP)
886 #define T_quiet_ne_char(a, e) T_flags_ne_char(a, e, T_CHECK_QUIET)
887 #define T_step_ne_char(s, a, e) T_flags_ne_char(a, e, T_CHECK_STEP(s))
888 #define T_step_assert_ne_char(s, a, e) \
889  T_flags_ne_char(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
890 
903 #define T_eq_schar(a, e) T_flags_eq_int(a, e, 0)
904 #define T_assert_eq_schar(a, e) T_flags_eq_int(a, e, T_CHECK_STOP)
905 #define T_quiet_eq_schar(a, e) T_flags_eq_int(a, e, T_CHECK_QUIET)
906 #define T_step_eq_schar(s, a, e) T_flags_eq_int(a, e, T_CHECK_STEP(s))
907 #define T_step_assert_eq_schar(s, a, e) \
908  T_flags_eq_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
909 
910 #define T_ne_schar(a, e) T_flags_ne_int(a, e, 0)
911 #define T_assert_ne_schar(a, e) T_flags_ne_int(a, e, T_CHECK_STOP)
912 #define T_quiet_ne_schar(a, e) T_flags_ne_int(a, e, T_CHECK_QUIET)
913 #define T_step_ne_schar(s, a, e) T_flags_ne_int(a, e, T_CHECK_STEP(s))
914 #define T_step_assert_ne_schar(s, a, e) \
915  T_flags_ne_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
916 
917 #define T_ge_schar(a, e) T_flags_ge_int(a, e, 0)
918 #define T_assert_ge_schar(a, e) T_flags_ge_int(a, e, T_CHECK_STOP)
919 #define T_quiet_ge_schar(a, e) T_flags_ge_int(a, e, T_CHECK_QUIET)
920 #define T_step_ge_schar(s, a, e) T_flags_ge_int(a, e, T_CHECK_STEP(s))
921 #define T_step_assert_ge_schar(s, a, e) \
922  T_flags_ge_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
923 
924 #define T_gt_schar(a, e) T_flags_gt_int(a, e, 0)
925 #define T_assert_gt_schar(a, e) T_flags_gt_int(a, e, T_CHECK_STOP)
926 #define T_quiet_gt_schar(a, e) T_flags_gt_int(a, e, T_CHECK_QUIET)
927 #define T_step_gt_schar(s, a, e) T_flags_gt_int(a, e, T_CHECK_STEP(s))
928 #define T_step_assert_gt_schar(s, a, e) \
929  T_flags_gt_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
930 
931 #define T_le_schar(a, e) T_flags_le_int(a, e, 0)
932 #define T_assert_le_schar(a, e) T_flags_le_int(a, e, T_CHECK_STOP)
933 #define T_quiet_le_schar(a, e) T_flags_le_int(a, e, T_CHECK_QUIET)
934 #define T_step_le_schar(s, a, e) T_flags_le_int(a, e, T_CHECK_STEP(s))
935 #define T_step_assert_le_schar(s, a, e) \
936  T_flags_le_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
937 
938 #define T_lt_schar(a, e) T_flags_lt_int(a, e, 0)
939 #define T_assert_lt_schar(a, e) T_flags_lt_int(a, e, T_CHECK_STOP)
940 #define T_quiet_lt_schar(a, e) T_flags_lt_int(a, e, T_CHECK_QUIET)
941 #define T_step_lt_schar(s, a, e) T_flags_lt_int(a, e, T_CHECK_STEP(s))
942 #define T_step_assert_lt_schar(s, a, e) \
943  T_flags_lt_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
944 
957 #define T_eq_uchar(a, e) T_flags_eq_uint(a, e, 0)
958 #define T_assert_eq_uchar(a, e) T_flags_eq_uint(a, e, T_CHECK_STOP)
959 #define T_quiet_eq_uchar(a, e) T_flags_eq_uint(a, e, T_CHECK_QUIET)
960 #define T_step_eq_uchar(s, a, e) T_flags_eq_uint(a, e, T_CHECK_STEP(s))
961 #define T_step_assert_eq_uchar(s, a, e) \
962  T_flags_eq_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
963 
964 #define T_ne_uchar(a, e) T_flags_ne_uint(a, e, 0)
965 #define T_assert_ne_uchar(a, e) T_flags_ne_uint(a, e, T_CHECK_STOP)
966 #define T_quiet_ne_uchar(a, e) T_flags_ne_uint(a, e, T_CHECK_QUIET)
967 #define T_step_ne_uchar(s, a, e) T_flags_ne_uint(a, e, T_CHECK_STEP(s))
968 #define T_step_assert_ne_uchar(s, a, e) \
969  T_flags_ne_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
970 
971 #define T_ge_uchar(a, e) T_flags_ge_uint(a, e, 0)
972 #define T_assert_ge_uchar(a, e) T_flags_ge_uint(a, e, T_CHECK_STOP)
973 #define T_quiet_ge_uchar(a, e) T_flags_ge_uint(a, e, T_CHECK_QUIET)
974 #define T_step_ge_uchar(s, a, e) T_flags_ge_uint(a, e, T_CHECK_STEP(s))
975 #define T_step_assert_ge_uchar(s, a, e) \
976  T_flags_ge_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
977 
978 #define T_gt_uchar(a, e) T_flags_gt_uint(a, e, 0)
979 #define T_assert_gt_uchar(a, e) T_flags_gt_uint(a, e, T_CHECK_STOP)
980 #define T_quiet_gt_uchar(a, e) T_flags_gt_uint(a, e, T_CHECK_QUIET)
981 #define T_step_gt_uchar(s, a, e) T_flags_gt_uint(a, e, T_CHECK_STEP(s))
982 #define T_step_assert_gt_uchar(s, a, e) \
983  T_flags_gt_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
984 
985 #define T_le_uchar(a, e) T_flags_le_uint(a, e, 0)
986 #define T_assert_le_uchar(a, e) T_flags_le_uint(a, e, T_CHECK_STOP)
987 #define T_quiet_le_uchar(a, e) T_flags_le_uint(a, e, T_CHECK_QUIET)
988 #define T_step_le_uchar(s, a, e) T_flags_le_uint(a, e, T_CHECK_STEP(s))
989 #define T_step_assert_le_uchar(s, a, e) \
990  T_flags_le_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
991 
992 #define T_lt_uchar(a, e) T_flags_lt_uint(a, e, 0)
993 #define T_assert_lt_uchar(a, e) T_flags_lt_uint(a, e, T_CHECK_STOP)
994 #define T_quiet_lt_uchar(a, e) T_flags_lt_uint(a, e, T_CHECK_QUIET)
995 #define T_step_lt_uchar(s, a, e) T_flags_lt_uint(a, e, T_CHECK_STEP(s))
996 #define T_step_assert_lt_uchar(s, a, e) \
997  T_flags_lt_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
998 
1011 #define T_eq_short(a, e) T_flags_eq_int(a, e, 0)
1012 #define T_assert_eq_short(a, e) T_flags_eq_int(a, e, T_CHECK_STOP)
1013 #define T_quiet_eq_short(a, e) T_flags_eq_int(a, e, T_CHECK_QUIET)
1014 #define T_step_eq_short(s, a, e) T_flags_eq_int(a, e, T_CHECK_STEP(s))
1015 #define T_step_assert_eq_short(s, a, e) \
1016  T_flags_eq_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1017 
1018 #define T_ne_short(a, e) T_flags_ne_int(a, e, 0)
1019 #define T_assert_ne_short(a, e) T_flags_ne_int(a, e, T_CHECK_STOP)
1020 #define T_quiet_ne_short(a, e) T_flags_ne_int(a, e, T_CHECK_QUIET)
1021 #define T_step_ne_short(s, a, e) T_flags_ne_int(a, e, T_CHECK_STEP(s))
1022 #define T_step_assert_ne_short(s, a, e) \
1023  T_flags_ne_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1024 
1025 #define T_ge_short(a, e) T_flags_ge_int(a, e, 0)
1026 #define T_assert_ge_short(a, e) T_flags_ge_int(a, e, T_CHECK_STOP)
1027 #define T_quiet_ge_short(a, e) T_flags_ge_int(a, e, T_CHECK_QUIET)
1028 #define T_step_ge_short(s, a, e) T_flags_ge_int(a, e, T_CHECK_STEP(s))
1029 #define T_step_assert_ge_short(s, a, e) \
1030  T_flags_ge_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1031 
1032 #define T_gt_short(a, e) T_flags_gt_int(a, e, 0)
1033 #define T_assert_gt_short(a, e) T_flags_gt_int(a, e, T_CHECK_STOP)
1034 #define T_quiet_gt_short(a, e) T_flags_gt_int(a, e, T_CHECK_QUIET)
1035 #define T_step_gt_short(s, a, e) T_flags_gt_int(a, e, T_CHECK_STEP(s))
1036 #define T_step_assert_gt_short(s, a, e) \
1037  T_flags_gt_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1038 
1039 #define T_le_short(a, e) T_flags_le_int(a, e, 0)
1040 #define T_assert_le_short(a, e) T_flags_le_int(a, e, T_CHECK_STOP)
1041 #define T_quiet_le_short(a, e) T_flags_le_int(a, e, T_CHECK_QUIET)
1042 #define T_step_le_short(s, a, e) T_flags_le_int(a, e, T_CHECK_STEP(s))
1043 #define T_step_assert_le_short(s, a, e) \
1044  T_flags_le_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1045 
1046 #define T_lt_short(a, e) T_flags_lt_int(a, e, 0)
1047 #define T_assert_lt_short(a, e) T_flags_lt_int(a, e, T_CHECK_STOP)
1048 #define T_quiet_lt_short(a, e) T_flags_lt_int(a, e, T_CHECK_QUIET)
1049 #define T_step_lt_short(s, a, e) T_flags_lt_int(a, e, T_CHECK_STEP(s))
1050 #define T_step_assert_lt_short(s, a, e) \
1051  T_flags_lt_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1052 
1065 #define T_eq_ushort(a, e) T_flags_eq_uint(a, e, 0)
1066 #define T_assert_eq_ushort(a, e) T_flags_eq_uint(a, e, T_CHECK_STOP)
1067 #define T_quiet_eq_ushort(a, e) T_flags_eq_uint(a, e, T_CHECK_QUIET)
1068 #define T_step_eq_ushort(s, a, e) T_flags_eq_uint(a, e, T_CHECK_STEP(s))
1069 #define T_step_assert_eq_ushort(s, a, e) \
1070  T_flags_eq_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1071 
1072 #define T_ne_ushort(a, e) T_flags_ne_uint(a, e, 0)
1073 #define T_assert_ne_ushort(a, e) T_flags_ne_uint(a, e, T_CHECK_STOP)
1074 #define T_quiet_ne_ushort(a, e) T_flags_ne_uint(a, e, T_CHECK_QUIET)
1075 #define T_step_ne_ushort(s, a, e) T_flags_ne_uint(a, e, T_CHECK_STEP(s))
1076 #define T_step_assert_ne_ushort(s, a, e) \
1077  T_flags_ne_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1078 
1079 #define T_ge_ushort(a, e) T_flags_ge_uint(a, e, 0)
1080 #define T_assert_ge_ushort(a, e) T_flags_ge_uint(a, e, T_CHECK_STOP)
1081 #define T_quiet_ge_ushort(a, e) T_flags_ge_uint(a, e, T_CHECK_QUIET)
1082 #define T_step_ge_ushort(s, a, e) T_flags_ge_uint(a, e, T_CHECK_STEP(s))
1083 #define T_step_assert_ge_ushort(s, a, e) \
1084  T_flags_ge_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1085 
1086 #define T_gt_ushort(a, e) T_flags_gt_uint(a, e, 0)
1087 #define T_assert_gt_ushort(a, e) T_flags_gt_uint(a, e, T_CHECK_STOP)
1088 #define T_quiet_gt_ushort(a, e) T_flags_gt_uint(a, e, T_CHECK_QUIET)
1089 #define T_step_gt_ushort(s, a, e) T_flags_gt_uint(a, e, T_CHECK_STEP(s))
1090 #define T_step_assert_gt_ushort(s, a, e) \
1091  T_flags_gt_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1092 
1093 #define T_le_ushort(a, e) T_flags_le_uint(a, e, 0)
1094 #define T_assert_le_ushort(a, e) T_flags_le_uint(a, e, T_CHECK_STOP)
1095 #define T_quiet_le_ushort(a, e) T_flags_le_uint(a, e, T_CHECK_QUIET)
1096 #define T_step_le_ushort(s, a, e) T_flags_le_uint(a, e, T_CHECK_STEP(s))
1097 #define T_step_assert_le_ushort(s, a, e) \
1098  T_flags_le_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1099 
1100 #define T_lt_ushort(a, e) T_flags_lt_uint(a, e, 0)
1101 #define T_assert_lt_ushort(a, e) T_flags_lt_uint(a, e, T_CHECK_STOP)
1102 #define T_quiet_lt_ushort(a, e) T_flags_lt_uint(a, e, T_CHECK_QUIET)
1103 #define T_step_lt_ushort(s, a, e) T_flags_lt_uint(a, e, T_CHECK_STEP(s))
1104 #define T_step_assert_lt_ushort(s, a, e) \
1105  T_flags_lt_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1106 
1119 #define T_eq_int(a, e) T_flags_eq_int(a, e, 0)
1120 #define T_assert_eq_int(a, e) T_flags_eq_int(a, e, T_CHECK_STOP)
1121 #define T_quiet_eq_int(a, e) T_flags_eq_int(a, e, T_CHECK_QUIET)
1122 #define T_step_eq_int(s, a, e) T_flags_eq_int(a, e, T_CHECK_STEP(s))
1123 #define T_step_assert_eq_int(s, a, e) \
1124  T_flags_eq_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1125 
1126 #define T_ne_int(a, e) T_flags_ne_int(a, e, 0)
1127 #define T_assert_ne_int(a, e) T_flags_ne_int(a, e, T_CHECK_STOP)
1128 #define T_quiet_ne_int(a, e) T_flags_ne_int(a, e, T_CHECK_QUIET)
1129 #define T_step_ne_int(s, a, e) T_flags_ne_int(a, e, T_CHECK_STEP(s))
1130 #define T_step_assert_ne_int(s, a, e) \
1131  T_flags_ne_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1132 
1133 #define T_ge_int(a, e) T_flags_ge_int(a, e, 0)
1134 #define T_assert_ge_int(a, e) T_flags_ge_int(a, e, T_CHECK_STOP)
1135 #define T_quiet_ge_int(a, e) T_flags_ge_int(a, e, T_CHECK_QUIET)
1136 #define T_step_ge_int(s, a, e) T_flags_ge_int(a, e, T_CHECK_STEP(s))
1137 #define T_step_assert_ge_int(s, a, e) \
1138  T_flags_ge_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1139 
1140 #define T_gt_int(a, e) T_flags_gt_int(a, e, 0)
1141 #define T_assert_gt_int(a, e) T_flags_gt_int(a, e, T_CHECK_STOP)
1142 #define T_quiet_gt_int(a, e) T_flags_gt_int(a, e, T_CHECK_QUIET)
1143 #define T_step_gt_int(s, a, e) T_flags_gt_int(a, e, T_CHECK_STEP(s))
1144 #define T_step_assert_gt_int(s, a, e) \
1145  T_flags_gt_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1146 
1147 #define T_le_int(a, e) T_flags_le_int(a, e, 0)
1148 #define T_assert_le_int(a, e) T_flags_le_int(a, e, T_CHECK_STOP)
1149 #define T_quiet_le_int(a, e) T_flags_le_int(a, e, T_CHECK_QUIET)
1150 #define T_step_le_int(s, a, e) T_flags_le_int(a, e, T_CHECK_STEP(s))
1151 #define T_step_assert_le_int(s, a, e) \
1152  T_flags_le_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1153 
1154 #define T_lt_int(a, e) T_flags_lt_int(a, e, 0)
1155 #define T_assert_lt_int(a, e) T_flags_lt_int(a, e, T_CHECK_STOP)
1156 #define T_quiet_lt_int(a, e) T_flags_lt_int(a, e, T_CHECK_QUIET)
1157 #define T_step_lt_int(s, a, e) T_flags_lt_int(a, e, T_CHECK_STEP(s))
1158 #define T_step_assert_lt_int(s, a, e) \
1159  T_flags_lt_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1160 
1173 #define T_eq_uint(a, e) T_flags_eq_uint(a, e, 0)
1174 #define T_assert_eq_uint(a, e) T_flags_eq_uint(a, e, T_CHECK_STOP)
1175 #define T_quiet_eq_uint(a, e) T_flags_eq_uint(a, e, T_CHECK_QUIET)
1176 #define T_step_eq_uint(s, a, e) T_flags_eq_uint(a, e, T_CHECK_STEP(s))
1177 #define T_step_assert_eq_uint(s, a, e) \
1178  T_flags_eq_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1179 
1180 #define T_ne_uint(a, e) T_flags_ne_uint(a, e, 0)
1181 #define T_assert_ne_uint(a, e) T_flags_ne_uint(a, e, T_CHECK_STOP)
1182 #define T_quiet_ne_uint(a, e) T_flags_ne_uint(a, e, T_CHECK_QUIET)
1183 #define T_step_ne_uint(s, a, e) T_flags_ne_uint(a, e, T_CHECK_STEP(s))
1184 #define T_step_assert_ne_uint(s, a, e) \
1185  T_flags_ne_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1186 
1187 #define T_ge_uint(a, e) T_flags_ge_uint(a, e, 0)
1188 #define T_assert_ge_uint(a, e) T_flags_ge_uint(a, e, T_CHECK_STOP)
1189 #define T_quiet_ge_uint(a, e) T_flags_ge_uint(a, e, T_CHECK_QUIET)
1190 #define T_step_ge_uint(s, a, e) T_flags_ge_uint(a, e, T_CHECK_STEP(s))
1191 #define T_step_assert_ge_uint(s, a, e) \
1192  T_flags_ge_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1193 
1194 #define T_gt_uint(a, e) T_flags_gt_uint(a, e, 0)
1195 #define T_assert_gt_uint(a, e) T_flags_gt_uint(a, e, T_CHECK_STOP)
1196 #define T_quiet_gt_uint(a, e) T_flags_gt_uint(a, e, T_CHECK_QUIET)
1197 #define T_step_gt_uint(s, a, e) T_flags_gt_uint(a, e, T_CHECK_STEP(s))
1198 #define T_step_assert_gt_uint(s, a, e) \
1199  T_flags_gt_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1200 
1201 #define T_le_uint(a, e) T_flags_le_uint(a, e, 0)
1202 #define T_assert_le_uint(a, e) T_flags_le_uint(a, e, T_CHECK_STOP)
1203 #define T_quiet_le_uint(a, e) T_flags_le_uint(a, e, T_CHECK_QUIET)
1204 #define T_step_le_uint(s, a, e) T_flags_le_uint(a, e, T_CHECK_STEP(s))
1205 #define T_step_assert_le_uint(s, a, e) \
1206  T_flags_le_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1207 
1208 #define T_lt_uint(a, e) T_flags_lt_uint(a, e, 0)
1209 #define T_assert_lt_uint(a, e) T_flags_lt_uint(a, e, T_CHECK_STOP)
1210 #define T_quiet_lt_uint(a, e) T_flags_lt_uint(a, e, T_CHECK_QUIET)
1211 #define T_step_lt_uint(s, a, e) T_flags_lt_uint(a, e, T_CHECK_STEP(s))
1212 #define T_step_assert_lt_uint(s, a, e) \
1213  T_flags_lt_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1214 
1227 #define T_eq_long(a, e) T_flags_eq_long(a, e, 0)
1228 #define T_assert_eq_long(a, e) T_flags_eq_long(a, e, T_CHECK_STOP)
1229 #define T_quiet_eq_long(a, e) T_flags_eq_long(a, e, T_CHECK_QUIET)
1230 #define T_step_eq_long(s, a, e) T_flags_eq_long(a, e, T_CHECK_STEP(s))
1231 #define T_step_assert_eq_long(s, a, e) \
1232  T_flags_eq_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1233 
1234 #define T_ne_long(a, e) T_flags_ne_long(a, e, 0)
1235 #define T_assert_ne_long(a, e) T_flags_ne_long(a, e, T_CHECK_STOP)
1236 #define T_quiet_ne_long(a, e) T_flags_ne_long(a, e, T_CHECK_QUIET)
1237 #define T_step_ne_long(s, a, e) T_flags_ne_long(a, e, T_CHECK_STEP(s))
1238 #define T_step_assert_ne_long(s, a, e) \
1239  T_flags_ne_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1240 
1241 #define T_ge_long(a, e) T_flags_ge_long(a, e, 0)
1242 #define T_assert_ge_long(a, e) T_flags_ge_long(a, e, T_CHECK_STOP)
1243 #define T_quiet_ge_long(a, e) T_flags_ge_long(a, e, T_CHECK_QUIET)
1244 #define T_step_ge_long(s, a, e) T_flags_ge_long(a, e, T_CHECK_STEP(s))
1245 #define T_step_assert_ge_long(s, a, e) \
1246  T_flags_ge_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1247 
1248 #define T_gt_long(a, e) T_flags_gt_long(a, e, 0)
1249 #define T_assert_gt_long(a, e) T_flags_gt_long(a, e, T_CHECK_STOP)
1250 #define T_quiet_gt_long(a, e) T_flags_gt_long(a, e, T_CHECK_QUIET)
1251 #define T_step_gt_long(s, a, e) T_flags_gt_long(a, e, T_CHECK_STEP(s))
1252 #define T_step_assert_gt_long(s, a, e) \
1253  T_flags_gt_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1254 
1255 #define T_le_long(a, e) T_flags_le_long(a, e, 0)
1256 #define T_assert_le_long(a, e) T_flags_le_long(a, e, T_CHECK_STOP)
1257 #define T_quiet_le_long(a, e) T_flags_le_long(a, e, T_CHECK_QUIET)
1258 #define T_step_le_long(s, a, e) T_flags_le_long(a, e, T_CHECK_STEP(s))
1259 #define T_step_assert_le_long(s, a, e) \
1260  T_flags_le_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1261 
1262 #define T_lt_long(a, e) T_flags_lt_long(a, e, 0)
1263 #define T_assert_lt_long(a, e) T_flags_lt_long(a, e, T_CHECK_STOP)
1264 #define T_quiet_lt_long(a, e) T_flags_lt_long(a, e, T_CHECK_QUIET)
1265 #define T_step_lt_long(s, a, e) T_flags_lt_long(a, e, T_CHECK_STEP(s))
1266 #define T_step_assert_lt_long(s, a, e) \
1267  T_flags_lt_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1268 
1281 #define T_eq_ulong(a, e) T_flags_eq_ulong(a, e, 0)
1282 #define T_assert_eq_ulong(a, e) T_flags_eq_ulong(a, e, T_CHECK_STOP)
1283 #define T_quiet_eq_ulong(a, e) T_flags_eq_ulong(a, e, T_CHECK_QUIET)
1284 #define T_step_eq_ulong(s, a, e) T_flags_eq_ulong(a, e, T_CHECK_STEP(s))
1285 #define T_step_assert_eq_ulong(s, a, e) \
1286  T_flags_eq_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1287 
1288 #define T_ne_ulong(a, e) T_flags_ne_ulong(a, e, 0)
1289 #define T_assert_ne_ulong(a, e) T_flags_ne_ulong(a, e, T_CHECK_STOP)
1290 #define T_quiet_ne_ulong(a, e) T_flags_ne_ulong(a, e, T_CHECK_QUIET)
1291 #define T_step_ne_ulong(s, a, e) T_flags_ne_ulong(a, e, T_CHECK_STEP(s))
1292 #define T_step_assert_ne_ulong(s, a, e) \
1293  T_flags_ne_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1294 
1295 #define T_ge_ulong(a, e) T_flags_ge_ulong(a, e, 0)
1296 #define T_assert_ge_ulong(a, e) T_flags_ge_ulong(a, e, T_CHECK_STOP)
1297 #define T_quiet_ge_ulong(a, e) T_flags_ge_ulong(a, e, T_CHECK_QUIET)
1298 #define T_step_ge_ulong(s, a, e) T_flags_ge_ulong(a, e, T_CHECK_STEP(s))
1299 #define T_step_assert_ge_ulong(s, a, e) \
1300  T_flags_ge_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1301 
1302 #define T_gt_ulong(a, e) T_flags_gt_ulong(a, e, 0)
1303 #define T_assert_gt_ulong(a, e) T_flags_gt_ulong(a, e, T_CHECK_STOP)
1304 #define T_quiet_gt_ulong(a, e) T_flags_gt_ulong(a, e, T_CHECK_QUIET)
1305 #define T_step_gt_ulong(s, a, e) T_flags_gt_ulong(a, e, T_CHECK_STEP(s))
1306 #define T_step_assert_gt_ulong(s, a, e) \
1307  T_flags_gt_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1308 
1309 #define T_le_ulong(a, e) T_flags_le_ulong(a, e, 0)
1310 #define T_assert_le_ulong(a, e) T_flags_le_ulong(a, e, T_CHECK_STOP)
1311 #define T_quiet_le_ulong(a, e) T_flags_le_ulong(a, e, T_CHECK_QUIET)
1312 #define T_step_le_ulong(s, a, e) T_flags_le_ulong(a, e, T_CHECK_STEP(s))
1313 #define T_step_assert_le_ulong(s, a, e) \
1314  T_flags_le_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1315 
1316 #define T_lt_ulong(a, e) T_flags_lt_ulong(a, e, 0)
1317 #define T_assert_lt_ulong(a, e) T_flags_lt_ulong(a, e, T_CHECK_STOP)
1318 #define T_quiet_lt_ulong(a, e) T_flags_lt_ulong(a, e, T_CHECK_QUIET)
1319 #define T_step_lt_ulong(s, a, e) T_flags_lt_ulong(a, e, T_CHECK_STEP(s))
1320 #define T_step_assert_lt_ulong(s, a, e) \
1321  T_flags_lt_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1322 
1335 #define T_eq_ll(a, e) T_flags_eq_ll(a, e, 0)
1336 #define T_assert_eq_ll(a, e) T_flags_eq_ll(a, e, T_CHECK_STOP)
1337 #define T_quiet_eq_ll(a, e) T_flags_eq_ll(a, e, T_CHECK_QUIET)
1338 #define T_step_eq_ll(s, a, e) T_flags_eq_ll(a, e, T_CHECK_STEP(s))
1339 #define T_step_assert_eq_ll(s, a, e) \
1340  T_flags_eq_ll(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1341 
1342 #define T_ne_ll(a, e) T_flags_ne_ll(a, e, 0)
1343 #define T_assert_ne_ll(a, e) T_flags_ne_ll(a, e, T_CHECK_STOP)
1344 #define T_quiet_ne_ll(a, e) T_flags_ne_ll(a, e, T_CHECK_QUIET)
1345 #define T_step_ne_ll(s, a, e) T_flags_ne_ll(a, e, T_CHECK_STEP(s))
1346 #define T_step_assert_ne_ll(s, a, e) \
1347  T_flags_ne_ll(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1348 
1349 #define T_ge_ll(a, e) T_flags_ge_ll(a, e, 0)
1350 #define T_assert_ge_ll(a, e) T_flags_ge_ll(a, e, T_CHECK_STOP)
1351 #define T_quiet_ge_ll(a, e) T_flags_ge_ll(a, e, T_CHECK_QUIET)
1352 #define T_step_ge_ll(s, a, e) T_flags_ge_ll(a, e, T_CHECK_STEP(s))
1353 #define T_step_assert_ge_ll(s, a, e) \
1354  T_flags_ge_ll(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1355 
1356 #define T_gt_ll(a, e) T_flags_gt_ll(a, e, 0)
1357 #define T_assert_gt_ll(a, e) T_flags_gt_ll(a, e, T_CHECK_STOP)
1358 #define T_quiet_gt_ll(a, e) T_flags_gt_ll(a, e, T_CHECK_QUIET)
1359 #define T_step_gt_ll(s, a, e) T_flags_gt_ll(a, e, T_CHECK_STEP(s))
1360 #define T_step_assert_gt_ll(s, a, e) \
1361  T_flags_gt_ll(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1362 
1363 #define T_le_ll(a, e) T_flags_le_ll(a, e, 0)
1364 #define T_assert_le_ll(a, e) T_flags_le_ll(a, e, T_CHECK_STOP)
1365 #define T_quiet_le_ll(a, e) T_flags_le_ll(a, e, T_CHECK_QUIET)
1366 #define T_step_le_ll(s, a, e) T_flags_le_ll(a, e, T_CHECK_STEP(s))
1367 #define T_step_assert_le_ll(s, a, e) \
1368  T_flags_le_ll(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1369 
1370 #define T_lt_ll(a, e) T_flags_lt_ll(a, e, 0)
1371 #define T_assert_lt_ll(a, e) T_flags_lt_ll(a, e, T_CHECK_STOP)
1372 #define T_quiet_lt_ll(a, e) T_flags_lt_ll(a, e, T_CHECK_QUIET)
1373 #define T_step_lt_ll(s, a, e) T_flags_lt_ll(a, e, T_CHECK_STEP(s))
1374 #define T_step_assert_lt_ll(s, a, e) \
1375  T_flags_lt_ll(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1376 
1389 #define T_eq_ull(a, e) T_flags_eq_ull(a, e, 0)
1390 #define T_assert_eq_ull(a, e) T_flags_eq_ull(a, e, T_CHECK_STOP)
1391 #define T_quiet_eq_ull(a, e) T_flags_eq_ull(a, e, T_CHECK_QUIET)
1392 #define T_step_eq_ull(s, a, e) T_flags_eq_ull(a, e, T_CHECK_STEP(s))
1393 #define T_step_assert_eq_ull(s, a, e) \
1394  T_flags_eq_ull(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1395 
1396 #define T_ne_ull(a, e) T_flags_ne_ull(a, e, 0)
1397 #define T_assert_ne_ull(a, e) T_flags_ne_ull(a, e, T_CHECK_STOP)
1398 #define T_quiet_ne_ull(a, e) T_flags_ne_ull(a, e, T_CHECK_QUIET)
1399 #define T_step_ne_ull(s, a, e) T_flags_ne_ull(a, e, T_CHECK_STEP(s))
1400 #define T_step_assert_ne_ull(s, a, e) \
1401  T_flags_ne_ull(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1402 
1403 #define T_ge_ull(a, e) T_flags_ge_ull(a, e, 0)
1404 #define T_assert_ge_ull(a, e) T_flags_ge_ull(a, e, T_CHECK_STOP)
1405 #define T_quiet_ge_ull(a, e) T_flags_ge_ull(a, e, T_CHECK_QUIET)
1406 #define T_step_ge_ull(s, a, e) T_flags_ge_ull(a, e, T_CHECK_STEP(s))
1407 #define T_step_assert_ge_ull(s, a, e) \
1408  T_flags_ge_ull(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1409 
1410 #define T_gt_ull(a, e) T_flags_gt_ull(a, e, 0)
1411 #define T_assert_gt_ull(a, e) T_flags_gt_ull(a, e, T_CHECK_STOP)
1412 #define T_quiet_gt_ull(a, e) T_flags_gt_ull(a, e, T_CHECK_QUIET)
1413 #define T_step_gt_ull(s, a, e) T_flags_gt_ull(a, e, T_CHECK_STEP(s))
1414 #define T_step_assert_gt_ull(s, a, e) \
1415  T_flags_gt_ull(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1416 
1417 #define T_le_ull(a, e) T_flags_le_ull(a, e, 0)
1418 #define T_assert_le_ull(a, e) T_flags_le_ull(a, e, T_CHECK_STOP)
1419 #define T_quiet_le_ull(a, e) T_flags_le_ull(a, e, T_CHECK_QUIET)
1420 #define T_step_le_ull(s, a, e) T_flags_le_ull(a, e, T_CHECK_STEP(s))
1421 #define T_step_assert_le_ull(s, a, e) \
1422  T_flags_le_ull(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1423 
1424 #define T_lt_ull(a, e) T_flags_lt_ull(a, e, 0)
1425 #define T_assert_lt_ull(a, e) T_flags_lt_ull(a, e, T_CHECK_STOP)
1426 #define T_quiet_lt_ull(a, e) T_flags_lt_ull(a, e, T_CHECK_QUIET)
1427 #define T_step_lt_ull(s, a, e) T_flags_lt_ull(a, e, T_CHECK_STEP(s))
1428 #define T_step_assert_lt_ull(s, a, e) \
1429  T_flags_lt_ull(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1430 
1443 #define T_eq_i8(a, e) T_flags_eq_int(a, e, 0)
1444 #define T_assert_eq_i8(a, e) T_flags_eq_int(a, e, T_CHECK_STOP)
1445 #define T_quiet_eq_i8(a, e) T_flags_eq_int(a, e, T_CHECK_QUIET)
1446 #define T_step_eq_i8(s, a, e) T_flags_eq_int(a, e, T_CHECK_STEP(s))
1447 #define T_step_assert_eq_i8(s, a, e) \
1448  T_flags_eq_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1449 
1450 #define T_ne_i8(a, e) T_flags_ne_int(a, e, 0)
1451 #define T_assert_ne_i8(a, e) T_flags_ne_int(a, e, T_CHECK_STOP)
1452 #define T_quiet_ne_i8(a, e) T_flags_ne_int(a, e, T_CHECK_QUIET)
1453 #define T_step_ne_i8(s, a, e) T_flags_ne_int(a, e, T_CHECK_STEP(s))
1454 #define T_step_assert_ne_i8(s, a, e) \
1455  T_flags_ne_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1456 
1457 #define T_ge_i8(a, e) T_flags_ge_int(a, e, 0)
1458 #define T_assert_ge_i8(a, e) T_flags_ge_int(a, e, T_CHECK_STOP)
1459 #define T_quiet_ge_i8(a, e) T_flags_ge_int(a, e, T_CHECK_QUIET)
1460 #define T_step_ge_i8(s, a, e) T_flags_ge_int(a, e, T_CHECK_STEP(s))
1461 #define T_step_assert_ge_i8(s, a, e) \
1462  T_flags_ge_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1463 
1464 #define T_gt_i8(a, e) T_flags_gt_int(a, e, 0)
1465 #define T_assert_gt_i8(a, e) T_flags_gt_int(a, e, T_CHECK_STOP)
1466 #define T_quiet_gt_i8(a, e) T_flags_gt_int(a, e, T_CHECK_QUIET)
1467 #define T_step_gt_i8(s, a, e) T_flags_gt_int(a, e, T_CHECK_STEP(s))
1468 #define T_step_assert_gt_i8(s, a, e) \
1469  T_flags_gt_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1470 
1471 #define T_le_i8(a, e) T_flags_le_int(a, e, 0)
1472 #define T_assert_le_i8(a, e) T_flags_le_int(a, e, T_CHECK_STOP)
1473 #define T_quiet_le_i8(a, e) T_flags_le_int(a, e, T_CHECK_QUIET)
1474 #define T_step_le_i8(s, a, e) T_flags_le_int(a, e, T_CHECK_STEP(s))
1475 #define T_step_assert_le_i8(s, a, e) \
1476  T_flags_le_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1477 
1478 #define T_lt_i8(a, e) T_flags_lt_int(a, e, 0)
1479 #define T_assert_lt_i8(a, e) T_flags_lt_int(a, e, T_CHECK_STOP)
1480 #define T_quiet_lt_i8(a, e) T_flags_lt_int(a, e, T_CHECK_QUIET)
1481 #define T_step_lt_i8(s, a, e) T_flags_lt_int(a, e, T_CHECK_STEP(s))
1482 #define T_step_assert_lt_i8(s, a, e) \
1483  T_flags_lt_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1484 
1497 #define T_eq_u8(a, e) T_flags_eq_uint(a, e, 0)
1498 #define T_assert_eq_u8(a, e) T_flags_eq_uint(a, e, T_CHECK_STOP)
1499 #define T_quiet_eq_u8(a, e) T_flags_eq_uint(a, e, T_CHECK_QUIET)
1500 #define T_step_eq_u8(s, a, e) T_flags_eq_uint(a, e, T_CHECK_STEP(s))
1501 #define T_step_assert_eq_u8(s, a, e) \
1502  T_flags_eq_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1503 
1504 #define T_ne_u8(a, e) T_flags_ne_uint(a, e, 0)
1505 #define T_assert_ne_u8(a, e) T_flags_ne_uint(a, e, T_CHECK_STOP)
1506 #define T_quiet_ne_u8(a, e) T_flags_ne_uint(a, e, T_CHECK_QUIET)
1507 #define T_step_ne_u8(s, a, e) T_flags_ne_uint(a, e, T_CHECK_STEP(s))
1508 #define T_step_assert_ne_u8(s, a, e) \
1509  T_flags_ne_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1510 
1511 #define T_ge_u8(a, e) T_flags_ge_uint(a, e, 0)
1512 #define T_assert_ge_u8(a, e) T_flags_ge_uint(a, e, T_CHECK_STOP)
1513 #define T_quiet_ge_u8(a, e) T_flags_ge_uint(a, e, T_CHECK_QUIET)
1514 #define T_step_ge_u8(s, a, e) T_flags_ge_uint(a, e, T_CHECK_STEP(s))
1515 #define T_step_assert_ge_u8(s, a, e) \
1516  T_flags_ge_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1517 
1518 #define T_gt_u8(a, e) T_flags_gt_uint(a, e, 0)
1519 #define T_assert_gt_u8(a, e) T_flags_gt_uint(a, e, T_CHECK_STOP)
1520 #define T_quiet_gt_u8(a, e) T_flags_gt_uint(a, e, T_CHECK_QUIET)
1521 #define T_step_gt_u8(s, a, e) T_flags_gt_uint(a, e, T_CHECK_STEP(s))
1522 #define T_step_assert_gt_u8(s, a, e) \
1523  T_flags_gt_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1524 
1525 #define T_le_u8(a, e) T_flags_le_uint(a, e, 0)
1526 #define T_assert_le_u8(a, e) T_flags_le_uint(a, e, T_CHECK_STOP)
1527 #define T_quiet_le_u8(a, e) T_flags_le_uint(a, e, T_CHECK_QUIET)
1528 #define T_step_le_u8(s, a, e) T_flags_le_uint(a, e, T_CHECK_STEP(s))
1529 #define T_step_assert_le_u8(s, a, e) \
1530  T_flags_le_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1531 
1532 #define T_lt_u8(a, e) T_flags_lt_uint(a, e, 0)
1533 #define T_assert_lt_u8(a, e) T_flags_lt_uint(a, e, T_CHECK_STOP)
1534 #define T_quiet_lt_u8(a, e) T_flags_lt_uint(a, e, T_CHECK_QUIET)
1535 #define T_step_lt_u8(s, a, e) T_flags_lt_uint(a, e, T_CHECK_STEP(s))
1536 #define T_step_assert_lt_u8(s, a, e) \
1537  T_flags_lt_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1538 
1551 #define T_eq_i16(a, e) T_flags_eq_int(a, e, 0)
1552 #define T_assert_eq_i16(a, e) T_flags_eq_int(a, e, T_CHECK_STOP)
1553 #define T_quiet_eq_i16(a, e) T_flags_eq_int(a, e, T_CHECK_QUIET)
1554 #define T_step_eq_i16(s, a, e) T_flags_eq_int(a, e, T_CHECK_STEP(s))
1555 #define T_step_assert_eq_i16(s, a, e) \
1556  T_flags_eq_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1557 
1558 #define T_ne_i16(a, e) T_flags_ne_int(a, e, 0)
1559 #define T_assert_ne_i16(a, e) T_flags_ne_int(a, e, T_CHECK_STOP)
1560 #define T_quiet_ne_i16(a, e) T_flags_ne_int(a, e, T_CHECK_QUIET)
1561 #define T_step_ne_i16(s, a, e) T_flags_ne_int(a, e, T_CHECK_STEP(s))
1562 #define T_step_assert_ne_i16(s, a, e) \
1563  T_flags_ne_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1564 
1565 #define T_ge_i16(a, e) T_flags_ge_int(a, e, 0)
1566 #define T_assert_ge_i16(a, e) T_flags_ge_int(a, e, T_CHECK_STOP)
1567 #define T_quiet_ge_i16(a, e) T_flags_ge_int(a, e, T_CHECK_QUIET)
1568 #define T_step_ge_i16(s, a, e) T_flags_ge_int(a, e, T_CHECK_STEP(s))
1569 #define T_step_assert_ge_i16(s, a, e) \
1570  T_flags_ge_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1571 
1572 #define T_gt_i16(a, e) T_flags_gt_int(a, e, 0)
1573 #define T_assert_gt_i16(a, e) T_flags_gt_int(a, e, T_CHECK_STOP)
1574 #define T_quiet_gt_i16(a, e) T_flags_gt_int(a, e, T_CHECK_QUIET)
1575 #define T_step_gt_i16(s, a, e) T_flags_gt_int(a, e, T_CHECK_STEP(s))
1576 #define T_step_assert_gt_i16(s, a, e) \
1577  T_flags_gt_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1578 
1579 #define T_le_i16(a, e) T_flags_le_int(a, e, 0)
1580 #define T_assert_le_i16(a, e) T_flags_le_int(a, e, T_CHECK_STOP)
1581 #define T_quiet_le_i16(a, e) T_flags_le_int(a, e, T_CHECK_QUIET)
1582 #define T_step_le_i16(s, a, e) T_flags_le_int(a, e, T_CHECK_STEP(s))
1583 #define T_step_assert_le_i16(s, a, e) \
1584  T_flags_le_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1585 
1586 #define T_lt_i16(a, e) T_flags_lt_int(a, e, 0)
1587 #define T_assert_lt_i16(a, e) T_flags_lt_int(a, e, T_CHECK_STOP)
1588 #define T_quiet_lt_i16(a, e) T_flags_lt_int(a, e, T_CHECK_QUIET)
1589 #define T_step_lt_i16(s, a, e) T_flags_lt_int(a, e, T_CHECK_STEP(s))
1590 #define T_step_assert_lt_i16(s, a, e) \
1591  T_flags_lt_int(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1592 
1605 #define T_eq_u16(a, e) T_flags_eq_uint(a, e, 0)
1606 #define T_assert_eq_u16(a, e) T_flags_eq_uint(a, e, T_CHECK_STOP)
1607 #define T_quiet_eq_u16(a, e) T_flags_eq_uint(a, e, T_CHECK_QUIET)
1608 #define T_step_eq_u16(s, a, e) T_flags_eq_uint(a, e, T_CHECK_STEP(s))
1609 #define T_step_assert_eq_u16(s, a, e) \
1610  T_flags_eq_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1611 
1612 #define T_ne_u16(a, e) T_flags_ne_uint(a, e, 0)
1613 #define T_assert_ne_u16(a, e) T_flags_ne_uint(a, e, T_CHECK_STOP)
1614 #define T_quiet_ne_u16(a, e) T_flags_ne_uint(a, e, T_CHECK_QUIET)
1615 #define T_step_ne_u16(s, a, e) T_flags_ne_uint(a, e, T_CHECK_STEP(s))
1616 #define T_step_assert_ne_u16(s, a, e) \
1617  T_flags_ne_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1618 
1619 #define T_ge_u16(a, e) T_flags_ge_uint(a, e, 0)
1620 #define T_assert_ge_u16(a, e) T_flags_ge_uint(a, e, T_CHECK_STOP)
1621 #define T_quiet_ge_u16(a, e) T_flags_ge_uint(a, e, T_CHECK_QUIET)
1622 #define T_step_ge_u16(s, a, e) T_flags_ge_uint(a, e, T_CHECK_STEP(s))
1623 #define T_step_assert_ge_u16(s, a, e) \
1624  T_flags_ge_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1625 
1626 #define T_gt_u16(a, e) T_flags_gt_uint(a, e, 0)
1627 #define T_assert_gt_u16(a, e) T_flags_gt_uint(a, e, T_CHECK_STOP)
1628 #define T_quiet_gt_u16(a, e) T_flags_gt_uint(a, e, T_CHECK_QUIET)
1629 #define T_step_gt_u16(s, a, e) T_flags_gt_uint(a, e, T_CHECK_STEP(s))
1630 #define T_step_assert_gt_u16(s, a, e) \
1631  T_flags_gt_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1632 
1633 #define T_le_u16(a, e) T_flags_le_uint(a, e, 0)
1634 #define T_assert_le_u16(a, e) T_flags_le_uint(a, e, T_CHECK_STOP)
1635 #define T_quiet_le_u16(a, e) T_flags_le_uint(a, e, T_CHECK_QUIET)
1636 #define T_step_le_u16(s, a, e) T_flags_le_uint(a, e, T_CHECK_STEP(s))
1637 #define T_step_assert_le_u16(s, a, e) \
1638  T_flags_le_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1639 
1640 #define T_lt_u16(a, e) T_flags_lt_uint(a, e, 0)
1641 #define T_assert_lt_u16(a, e) T_flags_lt_uint(a, e, T_CHECK_STOP)
1642 #define T_quiet_lt_u16(a, e) T_flags_lt_uint(a, e, T_CHECK_QUIET)
1643 #define T_step_lt_u16(s, a, e) T_flags_lt_uint(a, e, T_CHECK_STEP(s))
1644 #define T_step_assert_lt_u16(s, a, e) \
1645  T_flags_lt_uint(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1646 
1659 #define T_eq_i32(a, e) T_flags_eq_long(a, e, 0)
1660 #define T_assert_eq_i32(a, e) T_flags_eq_long(a, e, T_CHECK_STOP)
1661 #define T_quiet_eq_i32(a, e) T_flags_eq_long(a, e, T_CHECK_QUIET)
1662 #define T_step_eq_i32(s, a, e) T_flags_eq_long(a, e, T_CHECK_STEP(s))
1663 #define T_step_assert_eq_i32(s, a, e) \
1664  T_flags_eq_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1665 
1666 #define T_ne_i32(a, e) T_flags_ne_long(a, e, 0)
1667 #define T_assert_ne_i32(a, e) T_flags_ne_long(a, e, T_CHECK_STOP)
1668 #define T_quiet_ne_i32(a, e) T_flags_ne_long(a, e, T_CHECK_QUIET)
1669 #define T_step_ne_i32(s, a, e) T_flags_ne_long(a, e, T_CHECK_STEP(s))
1670 #define T_step_assert_ne_i32(s, a, e) \
1671  T_flags_ne_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1672 
1673 #define T_ge_i32(a, e) T_flags_ge_long(a, e, 0)
1674 #define T_assert_ge_i32(a, e) T_flags_ge_long(a, e, T_CHECK_STOP)
1675 #define T_quiet_ge_i32(a, e) T_flags_ge_long(a, e, T_CHECK_QUIET)
1676 #define T_step_ge_i32(s, a, e) T_flags_ge_long(a, e, T_CHECK_STEP(s))
1677 #define T_step_assert_ge_i32(s, a, e) \
1678  T_flags_ge_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1679 
1680 #define T_gt_i32(a, e) T_flags_gt_long(a, e, 0)
1681 #define T_assert_gt_i32(a, e) T_flags_gt_long(a, e, T_CHECK_STOP)
1682 #define T_quiet_gt_i32(a, e) T_flags_gt_long(a, e, T_CHECK_QUIET)
1683 #define T_step_gt_i32(s, a, e) T_flags_gt_long(a, e, T_CHECK_STEP(s))
1684 #define T_step_assert_gt_i32(s, a, e) \
1685  T_flags_gt_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1686 
1687 #define T_le_i32(a, e) T_flags_le_long(a, e, 0)
1688 #define T_assert_le_i32(a, e) T_flags_le_long(a, e, T_CHECK_STOP)
1689 #define T_quiet_le_i32(a, e) T_flags_le_long(a, e, T_CHECK_QUIET)
1690 #define T_step_le_i32(s, a, e) T_flags_le_long(a, e, T_CHECK_STEP(s))
1691 #define T_step_assert_le_i32(s, a, e) \
1692  T_flags_le_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1693 
1694 #define T_lt_i32(a, e) T_flags_lt_long(a, e, 0)
1695 #define T_assert_lt_i32(a, e) T_flags_lt_long(a, e, T_CHECK_STOP)
1696 #define T_quiet_lt_i32(a, e) T_flags_lt_long(a, e, T_CHECK_QUIET)
1697 #define T_step_lt_i32(s, a, e) T_flags_lt_long(a, e, T_CHECK_STEP(s))
1698 #define T_step_assert_lt_i32(s, a, e) \
1699  T_flags_lt_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1700 
1713 #define T_eq_u32(a, e) T_flags_eq_ulong(a, e, 0)
1714 #define T_assert_eq_u32(a, e) T_flags_eq_ulong(a, e, T_CHECK_STOP)
1715 #define T_quiet_eq_u32(a, e) T_flags_eq_ulong(a, e, T_CHECK_QUIET)
1716 #define T_step_eq_u32(s, a, e) T_flags_eq_ulong(a, e, T_CHECK_STEP(s))
1717 #define T_step_assert_eq_u32(s, a, e) \
1718  T_flags_eq_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1719 
1720 #define T_ne_u32(a, e) T_flags_ne_ulong(a, e, 0)
1721 #define T_assert_ne_u32(a, e) T_flags_ne_ulong(a, e, T_CHECK_STOP)
1722 #define T_quiet_ne_u32(a, e) T_flags_ne_ulong(a, e, T_CHECK_QUIET)
1723 #define T_step_ne_u32(s, a, e) T_flags_ne_ulong(a, e, T_CHECK_STEP(s))
1724 #define T_step_assert_ne_u32(s, a, e) \
1725  T_flags_ne_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1726 
1727 #define T_ge_u32(a, e) T_flags_ge_ulong(a, e, 0)
1728 #define T_assert_ge_u32(a, e) T_flags_ge_ulong(a, e, T_CHECK_STOP)
1729 #define T_quiet_ge_u32(a, e) T_flags_ge_ulong(a, e, T_CHECK_QUIET)
1730 #define T_step_ge_u32(s, a, e) T_flags_ge_ulong(a, e, T_CHECK_STEP(s))
1731 #define T_step_assert_ge_u32(s, a, e) \
1732  T_flags_ge_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1733 
1734 #define T_gt_u32(a, e) T_flags_gt_ulong(a, e, 0)
1735 #define T_assert_gt_u32(a, e) T_flags_gt_ulong(a, e, T_CHECK_STOP)
1736 #define T_quiet_gt_u32(a, e) T_flags_gt_ulong(a, e, T_CHECK_QUIET)
1737 #define T_step_gt_u32(s, a, e) T_flags_gt_ulong(a, e, T_CHECK_STEP(s))
1738 #define T_step_assert_gt_u32(s, a, e) \
1739  T_flags_gt_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1740 
1741 #define T_le_u32(a, e) T_flags_le_ulong(a, e, 0)
1742 #define T_assert_le_u32(a, e) T_flags_le_ulong(a, e, T_CHECK_STOP)
1743 #define T_quiet_le_u32(a, e) T_flags_le_ulong(a, e, T_CHECK_QUIET)
1744 #define T_step_le_u32(s, a, e) T_flags_le_ulong(a, e, T_CHECK_STEP(s))
1745 #define T_step_assert_le_u32(s, a, e) \
1746  T_flags_le_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1747 
1748 #define T_lt_u32(a, e) T_flags_lt_ulong(a, e, 0)
1749 #define T_assert_lt_u32(a, e) T_flags_lt_ulong(a, e, T_CHECK_STOP)
1750 #define T_quiet_lt_u32(a, e) T_flags_lt_ulong(a, e, T_CHECK_QUIET)
1751 #define T_step_lt_u32(s, a, e) T_flags_lt_ulong(a, e, T_CHECK_STEP(s))
1752 #define T_step_assert_lt_u32(s, a, e) \
1753  T_flags_lt_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1754 
1767 #define T_eq_i64(a, e) T_flags_eq_ll(a, e, 0)
1768 #define T_assert_eq_i64(a, e) T_flags_eq_ll(a, e, T_CHECK_STOP)
1769 #define T_quiet_eq_i64(a, e) T_flags_eq_ll(a, e, T_CHECK_QUIET)
1770 #define T_step_eq_i64(s, a, e) T_flags_eq_ll(a, e, T_CHECK_STEP(s))
1771 #define T_step_assert_eq_i64(s, a, e) \
1772  T_flags_eq_ll(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1773 
1774 #define T_ne_i64(a, e) T_flags_ne_ll(a, e, 0)
1775 #define T_assert_ne_i64(a, e) T_flags_ne_ll(a, e, T_CHECK_STOP)
1776 #define T_quiet_ne_i64(a, e) T_flags_ne_ll(a, e, T_CHECK_QUIET)
1777 #define T_step_ne_i64(s, a, e) T_flags_ne_ll(a, e, T_CHECK_STEP(s))
1778 #define T_step_assert_ne_i64(s, a, e) \
1779  T_flags_ne_ll(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1780 
1781 #define T_ge_i64(a, e) T_flags_ge_ll(a, e, 0)
1782 #define T_assert_ge_i64(a, e) T_flags_ge_ll(a, e, T_CHECK_STOP)
1783 #define T_quiet_ge_i64(a, e) T_flags_ge_ll(a, e, T_CHECK_QUIET)
1784 #define T_step_ge_i64(s, a, e) T_flags_ge_ll(a, e, T_CHECK_STEP(s))
1785 #define T_step_assert_ge_i64(s, a, e) \
1786  T_flags_ge_ll(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1787 
1788 #define T_gt_i64(a, e) T_flags_gt_ll(a, e, 0)
1789 #define T_assert_gt_i64(a, e) T_flags_gt_ll(a, e, T_CHECK_STOP)
1790 #define T_quiet_gt_i64(a, e) T_flags_gt_ll(a, e, T_CHECK_QUIET)
1791 #define T_step_gt_i64(s, a, e) T_flags_gt_ll(a, e, T_CHECK_STEP(s))
1792 #define T_step_assert_gt_i64(s, a, e) \
1793  T_flags_gt_ll(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1794 
1795 #define T_le_i64(a, e) T_flags_le_ll(a, e, 0)
1796 #define T_assert_le_i64(a, e) T_flags_le_ll(a, e, T_CHECK_STOP)
1797 #define T_quiet_le_i64(a, e) T_flags_le_ll(a, e, T_CHECK_QUIET)
1798 #define T_step_le_i64(s, a, e) T_flags_le_ll(a, e, T_CHECK_STEP(s))
1799 #define T_step_assert_le_i64(s, a, e) \
1800  T_flags_le_ll(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1801 
1802 #define T_lt_i64(a, e) T_flags_lt_ll(a, e, 0)
1803 #define T_assert_lt_i64(a, e) T_flags_lt_ll(a, e, T_CHECK_STOP)
1804 #define T_quiet_lt_i64(a, e) T_flags_lt_ll(a, e, T_CHECK_QUIET)
1805 #define T_step_lt_i64(s, a, e) T_flags_lt_ll(a, e, T_CHECK_STEP(s))
1806 #define T_step_assert_lt_i64(s, a, e) \
1807  T_flags_lt_ll(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1808 
1821 #define T_eq_u64(a, e) T_flags_eq_ull(a, e, 0)
1822 #define T_assert_eq_u64(a, e) T_flags_eq_ull(a, e, T_CHECK_STOP)
1823 #define T_quiet_eq_u64(a, e) T_flags_eq_ull(a, e, T_CHECK_QUIET)
1824 #define T_step_eq_u64(s, a, e) T_flags_eq_ull(a, e, T_CHECK_STEP(s))
1825 #define T_step_assert_eq_u64(s, a, e) \
1826  T_flags_eq_ull(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1827 
1828 #define T_ne_u64(a, e) T_flags_ne_ull(a, e, 0)
1829 #define T_assert_ne_u64(a, e) T_flags_ne_ull(a, e, T_CHECK_STOP)
1830 #define T_quiet_ne_u64(a, e) T_flags_ne_ull(a, e, T_CHECK_QUIET)
1831 #define T_step_ne_u64(s, a, e) T_flags_ne_ull(a, e, T_CHECK_STEP(s))
1832 #define T_step_assert_ne_u64(s, a, e) \
1833  T_flags_ne_ull(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1834 
1835 #define T_ge_u64(a, e) T_flags_ge_ull(a, e, 0)
1836 #define T_assert_ge_u64(a, e) T_flags_ge_ull(a, e, T_CHECK_STOP)
1837 #define T_quiet_ge_u64(a, e) T_flags_ge_ull(a, e, T_CHECK_QUIET)
1838 #define T_step_ge_u64(s, a, e) T_flags_ge_ull(a, e, T_CHECK_STEP(s))
1839 #define T_step_assert_ge_u64(s, a, e) \
1840  T_flags_ge_ull(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1841 
1842 #define T_gt_u64(a, e) T_flags_gt_ull(a, e, 0)
1843 #define T_assert_gt_u64(a, e) T_flags_gt_ull(a, e, T_CHECK_STOP)
1844 #define T_quiet_gt_u64(a, e) T_flags_gt_ull(a, e, T_CHECK_QUIET)
1845 #define T_step_gt_u64(s, a, e) T_flags_gt_ull(a, e, T_CHECK_STEP(s))
1846 #define T_step_assert_gt_u64(s, a, e) \
1847  T_flags_gt_ull(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1848 
1849 #define T_le_u64(a, e) T_flags_le_ull(a, e, 0)
1850 #define T_assert_le_u64(a, e) T_flags_le_ull(a, e, T_CHECK_STOP)
1851 #define T_quiet_le_u64(a, e) T_flags_le_ull(a, e, T_CHECK_QUIET)
1852 #define T_step_le_u64(s, a, e) T_flags_le_ull(a, e, T_CHECK_STEP(s))
1853 #define T_step_assert_le_u64(s, a, e) \
1854  T_flags_le_ull(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1855 
1856 #define T_lt_u64(a, e) T_flags_lt_ull(a, e, 0)
1857 #define T_assert_lt_u64(a, e) T_flags_lt_ull(a, e, T_CHECK_STOP)
1858 #define T_quiet_lt_u64(a, e) T_flags_lt_ull(a, e, T_CHECK_QUIET)
1859 #define T_step_lt_u64(s, a, e) T_flags_lt_ull(a, e, T_CHECK_STEP(s))
1860 #define T_step_assert_lt_u64(s, a, e) \
1861  T_flags_lt_ull(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1862 
1875 #define T_eq_iptr(a, e) T_flags_eq_long(a, e, 0)
1876 #define T_assert_eq_iptr(a, e) T_flags_eq_long(a, e, T_CHECK_STOP)
1877 #define T_quiet_eq_iptr(a, e) T_flags_eq_long(a, e, T_CHECK_QUIET)
1878 #define T_step_eq_iptr(s, a, e) T_flags_eq_long(a, e, T_CHECK_STEP(s))
1879 #define T_step_assert_eq_iptr(s, a, e) \
1880  T_flags_eq_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1881 
1882 #define T_ne_iptr(a, e) T_flags_ne_long(a, e, 0)
1883 #define T_assert_ne_iptr(a, e) T_flags_ne_long(a, e, T_CHECK_STOP)
1884 #define T_quiet_ne_iptr(a, e) T_flags_ne_long(a, e, T_CHECK_QUIET)
1885 #define T_step_ne_iptr(s, a, e) T_flags_ne_long(a, e, T_CHECK_STEP(s))
1886 #define T_step_assert_ne_iptr(s, a, e) \
1887  T_flags_ne_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1888 
1889 #define T_ge_iptr(a, e) T_flags_ge_long(a, e, 0)
1890 #define T_assert_ge_iptr(a, e) T_flags_ge_long(a, e, T_CHECK_STOP)
1891 #define T_quiet_ge_iptr(a, e) T_flags_ge_long(a, e, T_CHECK_QUIET)
1892 #define T_step_ge_iptr(s, a, e) T_flags_ge_long(a, e, T_CHECK_STEP(s))
1893 #define T_step_assert_ge_iptr(s, a, e) \
1894  T_flags_ge_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1895 
1896 #define T_gt_iptr(a, e) T_flags_gt_long(a, e, 0)
1897 #define T_assert_gt_iptr(a, e) T_flags_gt_long(a, e, T_CHECK_STOP)
1898 #define T_quiet_gt_iptr(a, e) T_flags_gt_long(a, e, T_CHECK_QUIET)
1899 #define T_step_gt_iptr(s, a, e) T_flags_gt_long(a, e, T_CHECK_STEP(s))
1900 #define T_step_assert_gt_iptr(s, a, e) \
1901  T_flags_gt_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1902 
1903 #define T_le_iptr(a, e) T_flags_le_long(a, e, 0)
1904 #define T_assert_le_iptr(a, e) T_flags_le_long(a, e, T_CHECK_STOP)
1905 #define T_quiet_le_iptr(a, e) T_flags_le_long(a, e, T_CHECK_QUIET)
1906 #define T_step_le_iptr(s, a, e) T_flags_le_long(a, e, T_CHECK_STEP(s))
1907 #define T_step_assert_le_iptr(s, a, e) \
1908  T_flags_le_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1909 
1910 #define T_lt_iptr(a, e) T_flags_lt_long(a, e, 0)
1911 #define T_assert_lt_iptr(a, e) T_flags_lt_long(a, e, T_CHECK_STOP)
1912 #define T_quiet_lt_iptr(a, e) T_flags_lt_long(a, e, T_CHECK_QUIET)
1913 #define T_step_lt_iptr(s, a, e) T_flags_lt_long(a, e, T_CHECK_STEP(s))
1914 #define T_step_assert_lt_iptr(s, a, e) \
1915  T_flags_lt_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1916 
1929 #define T_eq_uptr(a, e) T_flags_eq_ulong(a, e, 0)
1930 #define T_assert_eq_uptr(a, e) T_flags_eq_ulong(a, e, T_CHECK_STOP)
1931 #define T_quiet_eq_uptr(a, e) T_flags_eq_ulong(a, e, T_CHECK_QUIET)
1932 #define T_step_eq_uptr(s, a, e) T_flags_eq_ulong(a, e, T_CHECK_STEP(s))
1933 #define T_step_assert_eq_uptr(s, a, e) \
1934  T_flags_eq_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1935 
1936 #define T_ne_uptr(a, e) T_flags_ne_ulong(a, e, 0)
1937 #define T_assert_ne_uptr(a, e) T_flags_ne_ulong(a, e, T_CHECK_STOP)
1938 #define T_quiet_ne_uptr(a, e) T_flags_ne_ulong(a, e, T_CHECK_QUIET)
1939 #define T_step_ne_uptr(s, a, e) T_flags_ne_ulong(a, e, T_CHECK_STEP(s))
1940 #define T_step_assert_ne_uptr(s, a, e) \
1941  T_flags_ne_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1942 
1943 #define T_ge_uptr(a, e) T_flags_ge_ulong(a, e, 0)
1944 #define T_assert_ge_uptr(a, e) T_flags_ge_ulong(a, e, T_CHECK_STOP)
1945 #define T_quiet_ge_uptr(a, e) T_flags_ge_ulong(a, e, T_CHECK_QUIET)
1946 #define T_step_ge_uptr(s, a, e) T_flags_ge_ulong(a, e, T_CHECK_STEP(s))
1947 #define T_step_assert_ge_uptr(s, a, e) \
1948  T_flags_ge_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1949 
1950 #define T_gt_uptr(a, e) T_flags_gt_ulong(a, e, 0)
1951 #define T_assert_gt_uptr(a, e) T_flags_gt_ulong(a, e, T_CHECK_STOP)
1952 #define T_quiet_gt_uptr(a, e) T_flags_gt_ulong(a, e, T_CHECK_QUIET)
1953 #define T_step_gt_uptr(s, a, e) T_flags_gt_ulong(a, e, T_CHECK_STEP(s))
1954 #define T_step_assert_gt_uptr(s, a, e) \
1955  T_flags_gt_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1956 
1957 #define T_le_uptr(a, e) T_flags_le_ulong(a, e, 0)
1958 #define T_assert_le_uptr(a, e) T_flags_le_ulong(a, e, T_CHECK_STOP)
1959 #define T_quiet_le_uptr(a, e) T_flags_le_ulong(a, e, T_CHECK_QUIET)
1960 #define T_step_le_uptr(s, a, e) T_flags_le_ulong(a, e, T_CHECK_STEP(s))
1961 #define T_step_assert_le_uptr(s, a, e) \
1962  T_flags_le_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1963 
1964 #define T_lt_uptr(a, e) T_flags_lt_ulong(a, e, 0)
1965 #define T_assert_lt_uptr(a, e) T_flags_lt_ulong(a, e, T_CHECK_STOP)
1966 #define T_quiet_lt_uptr(a, e) T_flags_lt_ulong(a, e, T_CHECK_QUIET)
1967 #define T_step_lt_uptr(s, a, e) T_flags_lt_ulong(a, e, T_CHECK_STEP(s))
1968 #define T_step_assert_lt_uptr(s, a, e) \
1969  T_flags_lt_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1970 
1983 #define T_eq_ssz(a, e) T_flags_eq_long(a, e, 0)
1984 #define T_assert_eq_ssz(a, e) T_flags_eq_long(a, e, T_CHECK_STOP)
1985 #define T_quiet_eq_ssz(a, e) T_flags_eq_long(a, e, T_CHECK_QUIET)
1986 #define T_step_eq_ssz(s, a, e) T_flags_eq_long(a, e, T_CHECK_STEP(s))
1987 #define T_step_assert_eq_ssz(s, a, e) \
1988  T_flags_eq_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1989 
1990 #define T_ne_ssz(a, e) T_flags_ne_long(a, e, 0)
1991 #define T_assert_ne_ssz(a, e) T_flags_ne_long(a, e, T_CHECK_STOP)
1992 #define T_quiet_ne_ssz(a, e) T_flags_ne_long(a, e, T_CHECK_QUIET)
1993 #define T_step_ne_ssz(s, a, e) T_flags_ne_long(a, e, T_CHECK_STEP(s))
1994 #define T_step_assert_ne_ssz(s, a, e) \
1995  T_flags_ne_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
1996 
1997 #define T_ge_ssz(a, e) T_flags_ge_long(a, e, 0)
1998 #define T_assert_ge_ssz(a, e) T_flags_ge_long(a, e, T_CHECK_STOP)
1999 #define T_quiet_ge_ssz(a, e) T_flags_ge_long(a, e, T_CHECK_QUIET)
2000 #define T_step_ge_ssz(s, a, e) T_flags_ge_long(a, e, T_CHECK_STEP(s))
2001 #define T_step_assert_ge_ssz(s, a, e) \
2002  T_flags_ge_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
2003 
2004 #define T_gt_ssz(a, e) T_flags_gt_long(a, e, 0)
2005 #define T_assert_gt_ssz(a, e) T_flags_gt_long(a, e, T_CHECK_STOP)
2006 #define T_quiet_gt_ssz(a, e) T_flags_gt_long(a, e, T_CHECK_QUIET)
2007 #define T_step_gt_ssz(s, a, e) T_flags_gt_long(a, e, T_CHECK_STEP(s))
2008 #define T_step_assert_gt_ssz(s, a, e) \
2009  T_flags_gt_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
2010 
2011 #define T_le_ssz(a, e) T_flags_le_long(a, e, 0)
2012 #define T_assert_le_ssz(a, e) T_flags_le_long(a, e, T_CHECK_STOP)
2013 #define T_quiet_le_ssz(a, e) T_flags_le_long(a, e, T_CHECK_QUIET)
2014 #define T_step_le_ssz(s, a, e) T_flags_le_long(a, e, T_CHECK_STEP(s))
2015 #define T_step_assert_le_ssz(s, a, e) \
2016  T_flags_le_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
2017 
2018 #define T_lt_ssz(a, e) T_flags_lt_long(a, e, 0)
2019 #define T_assert_lt_ssz(a, e) T_flags_lt_long(a, e, T_CHECK_STOP)
2020 #define T_quiet_lt_ssz(a, e) T_flags_lt_long(a, e, T_CHECK_QUIET)
2021 #define T_step_lt_ssz(s, a, e) T_flags_lt_long(a, e, T_CHECK_STEP(s))
2022 #define T_step_assert_lt_ssz(s, a, e) \
2023  T_flags_lt_long(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
2024 
2037 #define T_eq_sz(a, e) T_flags_eq_ulong(a, e, 0)
2038 #define T_assert_eq_sz(a, e) T_flags_eq_ulong(a, e, T_CHECK_STOP)
2039 #define T_quiet_eq_sz(a, e) T_flags_eq_ulong(a, e, T_CHECK_QUIET)
2040 #define T_step_eq_sz(s, a, e) T_flags_eq_ulong(a, e, T_CHECK_STEP(s))
2041 #define T_step_assert_eq_sz(s, a, e) \
2042  T_flags_eq_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
2043 
2044 #define T_ne_sz(a, e) T_flags_ne_ulong(a, e, 0)
2045 #define T_assert_ne_sz(a, e) T_flags_ne_ulong(a, e, T_CHECK_STOP)
2046 #define T_quiet_ne_sz(a, e) T_flags_ne_ulong(a, e, T_CHECK_QUIET)
2047 #define T_step_ne_sz(s, a, e) T_flags_ne_ulong(a, e, T_CHECK_STEP(s))
2048 #define T_step_assert_ne_sz(s, a, e) \
2049  T_flags_ne_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
2050 
2051 #define T_ge_sz(a, e) T_flags_ge_ulong(a, e, 0)
2052 #define T_assert_ge_sz(a, e) T_flags_ge_ulong(a, e, T_CHECK_STOP)
2053 #define T_quiet_ge_sz(a, e) T_flags_ge_ulong(a, e, T_CHECK_QUIET)
2054 #define T_step_ge_sz(s, a, e) T_flags_ge_ulong(a, e, T_CHECK_STEP(s))
2055 #define T_step_assert_ge_sz(s, a, e) \
2056  T_flags_ge_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
2057 
2058 #define T_gt_sz(a, e) T_flags_gt_ulong(a, e, 0)
2059 #define T_assert_gt_sz(a, e) T_flags_gt_ulong(a, e, T_CHECK_STOP)
2060 #define T_quiet_gt_sz(a, e) T_flags_gt_ulong(a, e, T_CHECK_QUIET)
2061 #define T_step_gt_sz(s, a, e) T_flags_gt_ulong(a, e, T_CHECK_STEP(s))
2062 #define T_step_assert_gt_sz(s, a, e) \
2063  T_flags_gt_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
2064 
2065 #define T_le_sz(a, e) T_flags_le_ulong(a, e, 0)
2066 #define T_assert_le_sz(a, e) T_flags_le_ulong(a, e, T_CHECK_STOP)
2067 #define T_quiet_le_sz(a, e) T_flags_le_ulong(a, e, T_CHECK_QUIET)
2068 #define T_step_le_sz(s, a, e) T_flags_le_ulong(a, e, T_CHECK_STEP(s))
2069 #define T_step_assert_le_sz(s, a, e) \
2070  T_flags_le_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
2071 
2072 #define T_lt_sz(a, e) T_flags_lt_ulong(a, e, 0)
2073 #define T_assert_lt_sz(a, e) T_flags_lt_ulong(a, e, T_CHECK_STOP)
2074 #define T_quiet_lt_sz(a, e) T_flags_lt_ulong(a, e, T_CHECK_QUIET)
2075 #define T_step_lt_sz(s, a, e) T_flags_lt_ulong(a, e, T_CHECK_STEP(s))
2076 #define T_step_assert_lt_sz(s, a, e) \
2077  T_flags_lt_ulong(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
2078 
2091 const char *T_strerror(int);
2092 
2093 #define T_eno(a, e) T_flags_eno(a, e, 0)
2094 #define T_assert_eno(a, e) T_flags_eno(a, e, T_CHECK_STOP)
2095 #define T_quiet_eno(a, e) T_flags_eno(a, e, T_CHECK_QUIET)
2096 #define T_step_eno(s, a, e) T_flags_eno(a, e, T_CHECK_STEP(s))
2097 #define T_step_assert_eno(s, a, e) \
2098  T_flags_eno(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
2099 
2100 #define T_eno_success(a) T_flags_eno_success(a, 0)
2101 #define T_assert_eno_success(a) T_flags_eno_success(a, T_CHECK_STOP)
2102 #define T_quiet_eno_success(a) T_flags_eno_success(a, T_CHECK_QUIET)
2103 #define T_step_eno_success(s, a) T_flags_eno_success(a, T_CHECK_STEP(s))
2104 #define T_step_assert_eno_success(s, a) \
2105  T_flags_eno_success(a, T_CHECK_STEP(s) | T_CHECK_STOP)
2106 
2107 #define T_psx_error(a, eno) T_flags_psx_error(a, eno, 0)
2108 #define T_assert_psx_error(a, eno) T_flags_psx_error(a, eno, T_CHECK_STOP)
2109 #define T_quiet_psx_error(a, eno) T_flags_psx_error(a, eno, T_CHECK_QUIET)
2110 #define T_step_psx_error(s, a, eno) T_flags_psx_error(a, eno, T_CHECK_STEP(s))
2111 #define T_step_assert_psx_error(s, a, eno) \
2112  T_flags_psx_error(a, eno, T_CHECK_STEP(s) | T_CHECK_STOP)
2113 
2114 #define T_psx_success(a) T_flags_psx_success(a, 0)
2115 #define T_assert_psx_success(a) T_flags_psx_success(a, T_CHECK_STOP)
2116 #define T_quiet_psx_success(a) T_flags_psx_success(a, T_CHECK_QUIET)
2117 #define T_step_psx_success(s, a) T_flags_psx_success(a, T_CHECK_STEP(s))
2118 #define T_step_assert_psx_success(s, a) \
2119  T_flags_psx_success(a, T_CHECK_STEP(s) | T_CHECK_STOP)
2120 
2123 #ifdef __rtems__
2124 void T_check_rsc(const T_check_context *, uint32_t, uint32_t);
2125 
2126 #define T_flags_rsc(a, e, flags) \
2127 { \
2128  static const T_check_context T_check_instance = { \
2129  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
2130  T_check_rsc(&T_check_instance, a, e); \
2131 }
2132 
2133 void T_check_rsc_success(const T_check_context *, uint32_t);
2134 
2135 #define T_flags_rsc_success(a, flags) \
2136 { \
2137  static const T_check_context T_check_instance = { \
2138  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
2139  T_check_rsc_success(&T_check_instance, a); \
2140 }
2141 
2152 #define T_rsc(a, e) T_flags_rsc(a, e, 0)
2153 #define T_assert_rsc(a, e) T_flags_rsc(a, e, T_CHECK_STOP)
2154 #define T_quiet_rsc(a, e) T_flags_rsc(a, e, T_CHECK_QUIET)
2155 #define T_step_rsc(s, a, e) T_flags_rsc(a, e, T_CHECK_STEP(s))
2156 #define T_step_assert_rsc(s, a, e) \
2157  T_flags_rsc(a, e, T_CHECK_STEP(s) | T_CHECK_STOP)
2158 
2159 #define T_rsc_success(a) T_flags_rsc_success(a, 0)
2160 #define T_assert_rsc_success(a) T_flags_rsc_success(a, T_CHECK_STOP)
2161 #define T_quiet_rsc_success(a) T_flags_rsc_success(a, T_CHECK_QUIET)
2162 #define T_step_rsc_success(s, a) T_flags_rsc_success(a, T_CHECK_STEP(s))
2163 #define T_step_assert_rsc_success(s, a) \
2164  T_flags_rsc_success(a, T_CHECK_STEP(s) | T_CHECK_STOP)
2165 
2167 #endif /* __rtems__ */
2168 
2169 void T_plan(unsigned int);
2170 
2171 extern const T_fixture T_empty_fixture;
2172 
2173 void T_push_plan(T_fixture_node *, unsigned int);
2174 
2175 void T_pop_plan(void);
2176 
2177 void T_check_step(const T_check_context *, unsigned int);
2178 
2179 #define T_flags_step(a, flags) \
2180 { \
2181  static const T_check_context T_check_instance = { \
2182  T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }; \
2183  T_check_step(&T_check_instance, a); \
2184 }
2185 
2186 #define T_step(e) T_flags_step(e, 0)
2187 #define T_step_assert(e) T_flags_step(e, T_CHECK_STOP)
2188 
2199 #ifdef __rtems__
2200 typedef CPU_Counter_ticks T_ticks;
2201 #else
2202 typedef unsigned long T_ticks;
2203 #endif
2204 
2205 typedef uint64_t T_time;
2206 
2207 /* More than enough for sizeof("18446744073.709552765") */
2208 typedef char T_time_string[24];
2209 
2210 const char *T_time_to_string_ns(T_time, T_time_string);
2211 
2212 const char *T_time_to_string_us(T_time, T_time_string);
2213 
2214 const char *T_time_to_string_ms(T_time, T_time_string);
2215 
2216 const char *T_time_to_string_s(T_time, T_time_string);
2217 
2218 const char *T_ticks_to_string_ns(T_ticks, T_time_string);
2219 
2220 const char *T_ticks_to_string_us(T_ticks, T_time_string);
2221 
2222 const char *T_ticks_to_string_ms(T_ticks, T_time_string);
2223 
2224 const char *T_ticks_to_string_s(T_ticks, T_time_string);
2225 
2226 T_time T_ticks_to_time(T_ticks);
2227 
2228 T_ticks T_time_to_ticks(T_time);
2229 
2230 T_time T_seconds_and_nanoseconds_to_time(uint32_t, uint32_t);
2231 
2232 void T_time_to_seconds_and_nanoseconds(T_time, uint32_t *, uint32_t *);
2233 
2234 T_time T_now(void);
2235 
2236 #ifdef __rtems__
2237 static inline T_ticks
2238 T_tick(void)
2239 {
2240  return _CPU_Counter_read();
2241 }
2242 #else
2243 T_ticks T_tick(void);
2244 #endif
2245 
2246 T_time T_now_clock(void);
2247 
2248 T_time T_now_dummy(void);
2249 
2250 T_time T_now_tick(void);
2251 
2252 T_time T_case_begin_time(void);
2253 
2256 void *T_malloc(size_t);
2257 
2258 void *T_calloc(size_t, size_t);
2259 
2260 void *T_zalloc(size_t, void (*)(void *));
2261 
2262 void T_free(void *);
2263 
2264 void T_register(void);
2265 
2266 typedef enum {
2267  T_EVENT_RUN_INITIALIZE_EARLY,
2268  T_EVENT_RUN_INITIALIZE_LATE,
2269  T_EVENT_CASE_EARLY,
2270  T_EVENT_CASE_BEGIN,
2271  T_EVENT_CASE_END,
2272  T_EVENT_CASE_LATE,
2273  T_EVENT_RUN_FINALIZE_EARLY,
2274  T_EVENT_RUN_FINALIZE_LATE
2275 } T_event;
2276 
2277 typedef void (*T_action)(T_event, const char *);
2278 
2279 typedef void (*T_putchar)(int, void *);
2280 
2281 typedef struct {
2282  const char *name;
2283  char *buf;
2284  size_t buf_size;
2285  T_putchar putchar;
2286  void *putchar_arg;
2287  T_verbosity verbosity;
2288  T_time (*now)(void);
2289  size_t action_count;
2290  const T_action *actions;
2291 } T_config;
2292 
2293 void T_putchar_default(int, void *);
2294 
2295 int T_main(const T_config *);
2296 
2297 void T_make_runner(void);
2298 
2299 bool T_is_runner(void);
2300 
2301 void T_run_initialize(const T_config *);
2302 
2303 void T_run_all(void);
2304 
2305 void T_run_by_name(const char *);
2306 
2307 void T_case_begin(const char *, const T_fixture *);
2308 
2309 void T_case_end(void);
2310 
2311 bool T_run_finalize(void);
2312 
2313 void T_set_putchar(T_putchar, void *, T_putchar *, void **);
2314 
2315 void *T_fixture_context(void);
2316 
2317 void T_set_fixture_context(void *);
2318 
2319 void *T_push_fixture(T_fixture_node *, const T_fixture *);
2320 
2321 void T_pop_fixture(void);
2322 
2323 T_NO_RETURN void T_stop(void);
2324 
2325 #define T_unreachable() \
2326  do { T_true(false, "Unreachable"); T_stop(); } while (0)
2327 
2347 size_t T_get_scope(
2348  const char * const * const *desc,
2349  char *buf,
2350  size_t n,
2351  const size_t *second_indices
2352 );
2353 
2354 size_t T_str_copy(char *, const char *, size_t);
2355 
2356 #ifdef __rtems__
2357 #define T_TEST_CASE_FIXTURE(name, fixture) \
2358 void T_case_body_##name(void); \
2359 T_case_context T_case_instance_##name = { \
2360  #name, \
2361  T_case_body_##name, \
2362  fixture, \
2363  NULL \
2364 }; \
2365 static T_case_context * const T_case_item_##name \
2366 __attribute((__section__(".rtemsroset._T.content.0." #name))) \
2367 __attribute((__used__)) = &T_case_instance_##name; \
2368 void T_case_body_##name(void)
2369 #else /* __rtems__ */
2370 #define T_TEST_CASE_FIXTURE(name, fixture) \
2371 void T_case_body_##name(void); \
2372 T_case_context T_case_instance_##name = { \
2373  #name, \
2374  T_case_body_##name, \
2375  fixture, \
2376  NULL \
2377 }; \
2378 __attribute((__constructor__)) static void \
2379 T_case_register_##name(void) \
2380 { \
2381  T_case_register(&T_case_instance_##name); \
2382 } \
2383 void T_case_body_##name(void)
2384 #endif /* __rtems__ */
2385 
2386 #define T_TEST_CASE(name) T_TEST_CASE_FIXTURE(name, NULL)
2387 
2388 void T_busy(uint_fast32_t);
2389 
2390 uint_fast32_t T_get_one_clock_tick_busy(void);
2391 
2392 typedef enum {
2393  T_INTERRUPT_TEST_INITIAL,
2394  T_INTERRUPT_TEST_ACTION,
2395  T_INTERRUPT_TEST_BLOCKED,
2396  T_INTERRUPT_TEST_CONTINUE,
2397  T_INTERRUPT_TEST_DONE,
2398  T_INTERRUPT_TEST_EARLY,
2399  T_INTERRUPT_TEST_INTERRUPT,
2400  T_INTERRUPT_TEST_LATE,
2401  T_INTERRUPT_TEST_TIMEOUT
2402 } T_interrupt_test_state;
2403 
2404 typedef struct {
2405  void (*prepare)(void *);
2406  void (*action)(void *);
2407  T_interrupt_test_state (*interrupt)(void *);
2408  void (*blocked)(void *);
2409  uint32_t max_iteration_count;
2411 
2412 T_interrupt_test_state T_interrupt_test_change_state(T_interrupt_test_state,
2413  T_interrupt_test_state);
2414 
2415 T_interrupt_test_state T_interrupt_test_get_state(void);
2416 
2417 void T_interrupt_test_busy_wait_for_interrupt(void);
2418 
2419 T_interrupt_test_state T_interrupt_test(const T_interrupt_test_config *config,
2420  void *arg);
2421 
2422 typedef struct {
2423  uint32_t executing;
2424  uint32_t heir;
2425  uint32_t cpu;
2426  T_time instant;
2428 
2429 typedef struct {
2430  size_t recorded;
2431  size_t capacity;
2432  uint64_t switches;
2433  T_thread_switch_event events[T_ZERO_LENGTH_ARRAY];
2435 
2436 typedef struct {
2437  T_thread_switch_log log;
2438  T_thread_switch_event events[T_ZERO_LENGTH_ARRAY_EXTENSION(2)];
2440 
2441 typedef struct {
2442  T_thread_switch_log log;
2443  T_thread_switch_event events[T_ZERO_LENGTH_ARRAY_EXTENSION(4)];
2445 
2446 typedef struct {
2447  T_thread_switch_log log;
2448  T_thread_switch_event events[T_ZERO_LENGTH_ARRAY_EXTENSION(10)];
2450 
2451 T_thread_switch_log *T_thread_switch_record(T_thread_switch_log *);
2452 
2453 T_thread_switch_log *T_thread_switch_record_2(T_thread_switch_log_2 *);
2454 
2455 T_thread_switch_log *T_thread_switch_record_4(T_thread_switch_log_4 *);
2456 
2457 T_thread_switch_log *T_thread_switch_record_10(T_thread_switch_log_10 *);
2458 
2459 void T_report_hash_sha256(T_event, const char *);
2460 
2461 void T_check_heap(T_event, const char *);
2462 
2463 #ifdef __rtems__
2464 void T_check_task_context(T_event, const char *);
2465 
2466 void T_check_file_descriptors(T_event, const char *);
2467 
2468 void T_check_rtems_barriers(T_event, const char *);
2469 
2470 void T_check_rtems_extensions(T_event, const char *);
2471 
2472 void T_check_rtems_message_queues(T_event, const char *);
2473 
2474 void T_check_rtems_partitions(T_event, const char *);
2475 
2476 void T_check_rtems_periods(T_event, const char *);
2477 
2478 void T_check_rtems_regions(T_event, const char *);
2479 
2480 void T_check_rtems_semaphores(T_event, const char *);
2481 
2482 void T_check_rtems_tasks(T_event, const char *);
2483 
2484 void T_check_rtems_timers(T_event, const char *);
2485 
2486 void T_check_posix_keys(T_event, const char *);
2487 
2488 void T_check_posix_message_queues(T_event, const char *);
2489 
2490 void T_check_posix_semaphores(T_event, const char *);
2491 
2492 void T_check_posix_shms(T_event, const char *);
2493 
2494 void T_check_posix_threads(T_event, const char *);
2495 
2496 void T_check_posix_timers(T_event, const char *);
2497 #endif /* __rtems__ */
2498 
2509 typedef struct T_destructor {
2510  struct {
2511  struct T_destructor *le_next;
2512  struct T_destructor **le_prev;
2513  } node;
2514  void (*destroy)(struct T_destructor *);
2515 } T_destructor;
2516 
2517 void T_add_destructor(T_destructor *, void (*)(T_destructor *));
2518 
2519 void T_remove_destructor(T_destructor *);
2520 
2534 
2535 typedef struct {
2536  size_t sample_count;
2538 
2539 typedef struct {
2540  const char *name;
2541  int flags;
2542  void (*setup)(void *);
2543  void (*body)(void *);
2544  bool (*teardown)(void *, T_ticks *, uint32_t, uint32_t, unsigned int);
2545  void *arg;
2547 
2548 #define T_MEASURE_RUNTIME_ALLOW_CLOCK_ISR 0x1
2549 
2550 #define T_MEASURE_RUNTIME_REPORT_SAMPLES 0x2
2551 
2552 #define T_MEASURE_RUNTIME_DISABLE_VALID_CACHE 0x10
2553 
2554 #define T_MEASURE_RUNTIME_DISABLE_HOT_CACHE 0x20
2555 
2556 #define T_MEASURE_RUNTIME_DISABLE_DIRTY_CACHE 0x40
2557 
2558 #define T_MEASURE_RUNTIME_DISABLE_MINOR_LOAD 0x80
2559 
2560 #define T_MEASURE_RUNTIME_DISABLE_MAX_LOAD 0x100
2561 
2562 T_measure_runtime_context *T_measure_runtime_create(
2563  const T_measure_runtime_config *);
2564 
2565 void T_measure_runtime(T_measure_runtime_context *,
2566  const T_measure_runtime_request *);
2567 
2570 #ifdef __cplusplus
2571 }
2572 #endif /* __cplusplus */
2573 
2574 #endif /* THE_T_TEST_FRAMEWORK_H */
SPARC CPU Department Source.
Definition: test.h:61