uLib
|
Public API parameter validation. More...
#include "azure_macro_utils/macro_utils.h"
#include "ulib_config.h"
#include "ulib_port.h"
#include "ulog.h"
#include <stdio.h>
Go to the source code of this file.
Macros | |
#define | AZ_UCONTRACT(...) do { MU_FOR_EACH_1(EVALUATE_REQUIRE, __VA_ARGS__) } while((void)0,0) |
Macro to define contract for public function parameters. More... | |
#define | AZ_UASSERT(...) AZ_UCONTRACT(__VA_ARGS__) |
Macro to define assertion for internal functions. More... | |
#define | AZ_UCONTRACT_REQUIRE(expression, result, msg) |
Contract macro to evaluation developer expression. More... | |
#define | AZ_UCONTRACT_REQUIRE_EQUALS(val, expected, result) |
Contract macro to evaluate if two values are equal. More... | |
#define | AZ_UCONTRACT_REQUIRE_NOT_EQUALS(val, expected, result) |
Contract macro to evaluate if two values are not equal. More... | |
#define | AZ_UCONTRACT_REQUIRE_NOT_NULL(val, result) |
Contract macro to evaluate if value is not NULL . More... | |
#define | AZ_UCONTRACT_REQUIRE_HARD_FAULT(expression, msg) |
Contract macro to evaluate developer expression. More... | |
#define | AZ_UCONTRACT_REQUIRE_EQUALS_HARD_FAULT(val, expected) |
Contract macro to evaluate if two values are equal. More... | |
#define | AZ_UCONTRACT_REQUIRE_NOT_EQUALS_HARD_FAULT(val, expected) |
Contract macro to evaluate if two values are not equal. More... | |
#define | AZ_UCONTRACT_REQUIRE_NOT_NULL_HARD_FAULT(val) |
Contract macro to evaluate if value is not NULL . More... | |
Public API parameter validation.
Definition in file ucontract.h.
#define AZ_UASSERT | ( | ... | ) | AZ_UCONTRACT(__VA_ARGS__) |
Macro to define assertion for internal functions.
Parameters to this macro shall be a comma separated list of AZ_UCONTRACT_... macros as listed below.
Definition at line 48 of file ucontract.h.
#define AZ_UCONTRACT | ( | ... | ) | do { MU_FOR_EACH_1(EVALUATE_REQUIRE, __VA_ARGS__) } while((void)0,0) |
Macro to define contract for public function parameters.
Parameters to this macro shall be a comma separated list of AZ_UCONTRACT_... macros as listed below.
Each public function shall have one AZ_UCONTRACT() macro with the listed requirements inside.
Definition at line 37 of file ucontract.h.
#define AZ_UCONTRACT_REQUIRE | ( | expression, | |
result, | |||
msg | |||
) |
Contract macro to evaluation developer expression.
expression | boolean expression to be evaluated |
result | return value if expression is false |
msg | message to log if expression is false |
Definition at line 58 of file ucontract.h.
#define AZ_UCONTRACT_REQUIRE_EQUALS | ( | val, | |
expected, | |||
result | |||
) |
Contract macro to evaluate if two values are equal.
val | value to check |
expected | value expected |
result | returned result if values are not equal |
Definition at line 74 of file ucontract.h.
#define AZ_UCONTRACT_REQUIRE_EQUALS_HARD_FAULT | ( | val, | |
expected | |||
) |
Contract macro to evaluate if two values are equal.
val | value to check |
expected | value expected |
Definition at line 139 of file ucontract.h.
#define AZ_UCONTRACT_REQUIRE_HARD_FAULT | ( | expression, | |
msg | |||
) |
Contract macro to evaluate developer expression.
expression | expression to check |
msg | message to log if expression is false |
Definition at line 122 of file ucontract.h.
#define AZ_UCONTRACT_REQUIRE_NOT_EQUALS | ( | val, | |
expected, | |||
result | |||
) |
Contract macro to evaluate if two values are not equal.
val | value to check |
expected | value not expected |
result | returned result if values are equal. |
Definition at line 90 of file ucontract.h.
#define AZ_UCONTRACT_REQUIRE_NOT_EQUALS_HARD_FAULT | ( | val, | |
expected | |||
) |
Contract macro to evaluate if two values are not equal.
val | value to check |
expected | value not expected |
Definition at line 156 of file ucontract.h.
#define AZ_UCONTRACT_REQUIRE_NOT_NULL | ( | val, | |
result | |||
) |
Contract macro to evaluate if value is not NULL
.
val | value to check |
result | returned result if value is NULL |
Definition at line 105 of file ucontract.h.
#define AZ_UCONTRACT_REQUIRE_NOT_NULL_HARD_FAULT | ( | val | ) |
Contract macro to evaluate if value is not NULL
.
NULL
val | value to check |
Definition at line 172 of file ucontract.h.