Releases: rpolitex/simpleassert
Release list
PlatformIO Properties changed to support any framework
Release/Development Log form
If macros DEV_MODE is defined, logs a printed in a full form: function name, file name, line of code. Also ASSERTION, CHECK0, CHEKOK, print a the full message (such as "FUNCTIONNAME returns non-zero errcode").
Otherwise (release mode) - the short form of log used: no file name, shorter messages.
DEV_MODE is enabled by default
One-statement Asserts
-
Previously the
ASSERT()macro has been composed of several statements: variable define and twoifstatements.
This is not always acceptable as the user sees only one simple macro call (ASSERT()) in the code and wants to treat it as a one statement or like a function call.
So, all main macros (ASSERT,CHECK1,CHECK0) have been refactored in this release.
ASSERTandCHECK1become a one statement "if-based" macros.
CHECK0becomes a one statement nested "if-based" macro. -
CHECK1now has synonymCHECKOKwhich seems to be more easy to read and understand. -
CHECK0received new feature - error code retrieving. You can read the code, returned by function under the checking, by a special macroCHECK_RES. SeeReadme.mdfor examples.
Minor version updates
Printing to stdout, docs updated
3.1 Update README.md
Added default message supressing
Added a feature to suppress default assert/check messages:
ASSERT(x > 0, "") return -1;
CHECK0(foo(), "") {
printf("Some custom message\n");
return -1;
}