Handy macros for Basic Functionality Tests.
More...
#include <iostream>
#include <assert.h>
Go to the source code of this file.
Handy macros for Basic Functionality Tests.
- Deprecated:
- This module was deprecated in SDK 17.0 — use DocTest instead.
- Warning
- This module will be removed in a future SDK.
- Copyright
- (C) 2014-2022 AJA Video Systems, Inc. All rights reserved.
Definition in file ntv2bft.h.
◆ DEBUG_BREAK
#define DEBUG_BREAK |
( |
| ) |
do {} while (false) |
◆ DEBUG_BREAK_AFTER_FAILURE
#define DEBUG_BREAK_AFTER_FAILURE (false) |
◆ ENDL
◆ SHOULD_BE_EQUAL
#define SHOULD_BE_EQUAL |
( |
|
_x_, |
|
|
|
_y_ |
|
) |
| |
Value: do \
{ \
if ((_x_) != (_y_)) \
{ \
STDERR <<
"## ERROR: '" << __FUNCTION__ <<
"' failed at line " << __LINE__ <<
" of " << __FILE__ <<
":" <<
ENDL \
<<
" '" << (_x_) <<
"' is not equal to '" << (_y_) <<
"'" <<
ENDL \
<<
" Expected '" << #_x_ <<
"' to equal '" << #_y_ <<
"'" <<
ENDL; \
{ \
DEBUG_BREAK (); \
return false; \
} \
} \
STDOUT <<
"## NOTE: '" << #_x_ <<
"' is equal to '" << #_y_ <<
"' in '" << __FUNCTION__ <<
"'" <<
ENDL; \
} while (false)
Definition at line 162 of file ntv2bft.h.
◆ SHOULD_BE_FALSE
#define SHOULD_BE_FALSE |
( |
|
_x_ | ) |
|
Value: do \
{ \
if (_x_) \
{ \
STDERR <<
"## ERROR: '" << __FUNCTION__ <<
"' failed at line " << __LINE__ <<
" of " << __FILE__ <<
":" <<
ENDL \
<<
" Expected 'False' result from '" << #_x_ <<
"'" <<
ENDL \
<<
" Instead got 'True'" <<
ENDL; \
{ \
DEBUG_BREAK (); \
return false; \
} \
} \
STDOUT <<
"## NOTE: '" << #_x_ <<
"' in '" << __FUNCTION__ <<
"' returned 'False'" <<
ENDL; \
} while (false)
Definition at line 105 of file ntv2bft.h.
◆ SHOULD_BE_NON_NULL
#define SHOULD_BE_NON_NULL |
( |
|
_x_ | ) |
|
Value: do \
{ \
{ \
STDERR <<
"## ERROR: '" << __FUNCTION__ <<
"' failed at line " << __LINE__ <<
" of " << __FILE__ <<
":" <<
ENDL \
<<
" '" << (_x_) <<
"' is NULL" <<
ENDL \
<<
" Expected '" << #_x_ <<
"' to be non-NULL" <<
ENDL; \
{ \
DEBUG_BREAK (); \
return false; \
} \
} \
STDOUT <<
"## NOTE: '" << #_x_ <<
"' is non-NULL in '" << __FUNCTION__ <<
"'" <<
ENDL; \
} while (false)
Definition at line 143 of file ntv2bft.h.
◆ SHOULD_BE_NULL
#define SHOULD_BE_NULL |
( |
|
_x_ | ) |
|
Value: do \
{ \
{ \
STDERR <<
"## ERROR: '" << __FUNCTION__ <<
"' failed at line " << __LINE__ <<
" of " << __FILE__ <<
":" <<
ENDL \
<<
" '" << (_x_) <<
"' is non-NULL" <<
ENDL \
<<
" Expected '" << #_x_ <<
"' to be NULL" <<
ENDL; \
{ \
DEBUG_BREAK (); \
return false; \
} \
} \
STDOUT <<
"## NOTE: '" << #_x_ <<
"' is NULL in '" << __FUNCTION__ <<
"'" <<
ENDL; \
} while (false)
Definition at line 124 of file ntv2bft.h.
◆ SHOULD_BE_TRUE
#define SHOULD_BE_TRUE |
( |
|
_x_ | ) |
|
Value: do \
{ \
if (!(_x_)) \
{ \
STDERR <<
"## ERROR: '" << __FUNCTION__ <<
"' failed at line " << __LINE__ <<
" of " << __FILE__ <<
":" <<
ENDL \
<<
" Expected 'True' result from '" << #_x_ <<
"'" <<
ENDL \
<<
" Instead got 'False'" <<
ENDL; \
{ \
DEBUG_BREAK (); \
return false; \
} \
} \
STDOUT <<
"## NOTE: '" << #_x_ <<
"' in '" << __FUNCTION__ <<
"' returned 'True'" <<
ENDL; \
} while (false)
Definition at line 86 of file ntv2bft.h.
◆ SHOULD_BE_UNEQUAL
#define SHOULD_BE_UNEQUAL |
( |
|
_x_, |
|
|
|
_y_ |
|
) |
| |
Value: do \
{ \
if ((_x_) == (_y_)) \
{ \
STDERR <<
"## ERROR: '" << __FUNCTION__ <<
"' failed at line " << __LINE__ <<
" of " << __FILE__ <<
":" <<
ENDL \
<<
" '" << (_x_) <<
"' is equal to '" << (_y_) <<
"'" <<
ENDL \
<<
" Expected '" << #_x_ <<
"' to not equal '" << #_y_ <<
"'" <<
ENDL; \
{ \
DEBUG_BREAK (); \
return false; \
} \
} \
STDOUT <<
"## NOTE: '" << #_x_ <<
"' is not equal to '" << #_y_ <<
"' in '" << __FUNCTION__ <<
"'" <<
ENDL; \
} while (false)
Definition at line 181 of file ntv2bft.h.
◆ SHOW_PASSED
#define SHOW_PASSED (false) |
◆ STDERR
◆ STDOUT
◆ STOP_AFTER_FAILURE
#define STOP_AFTER_FAILURE (true) |