On top of that, the condition can be replaced with a Rich Boolean, that gives an informative analysis of why the condition failed (e.g. to show which bits are different in two integers if you ask for a bitwise comparison, or which elements of two wxArrays are different). See http://sourceforge.net/projects/rich-booleans/ to download the Rich Booleans (needed by ModAssert).
Using it can be as simple as
Code: Select all
MOD_ASSERT(a==1);
Code: Select all
MOD_ASSERT_PTO(b<<c, ModAssert::Error, return false, "return false", rbEQUAL(a,1));
- write your own dialog to display assertions (one for wxWidgets is already provided)
- write your own assertion logger (one for wxWidgets is already provided)
- write your own Rich Booleans (over 70 already provided)
- extend the context displayed, to show more than just the file and linenumber (e.g. threadid, backtrace, ...)
It allows you to compile out assertions per level, group, file or all at once. Displaying and logging of failed assertions can be controlled at runtime per level, group, file or all at once.
A small demo application that uses wxWidgets is provided. This also demonstrates how you can reroute wxWidgets assertion macros to ModAssert.
[/url]