SOM_Expect
Appearance
This macro asserts that a boolean condition is expected to be true.
Syntax
boolean condition; SOM_Expect(condition);
Parameters
- condition(boolean)
- A boolean expression that is expected to be TRUE (nonzero).
Remarks
The SOM_Expect macro is used to place boolean assertions that are expected to be true into a program:
- If condition is FALSE and SOM_WarnLevel is set to be greater than zero, then a warning message is output.
- If condition is TRUE and SOM_AssertLevel is set to be greater than zero, then an informational message is output.
Expansion
If condition is FALSE and SOM_WarnLevel is set to be greater than zero, then a warning message is output. If condition is TRUE and SOM_AssertLevel is set to be greater than zero, then an information message is output.
Example Code
SOM_Expect(2==2);