SOM Kernel Reference 1-55
SOM_Expect Macro
Purpose
Asserts that a boolean condition is expected to be true.
Syntax
void SOM_Expect (boolean condition);
Description
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.
Parameters
condition A boolean expression that is expected to be TRUE (nonzero).
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
SOM_Expect(2==2);
Related Information
Macros: SOM_Assert, SOM_Test, SOM_TestC
Commenti su questo manuale