|This class is utilzed by the macros defined in this header file. No calling code should typically ever need to use this class directly. More...|
|#define||DISABLE_ASSERTS AssertDisabler assertDisabler;|
|Utilize this macro to disable asserts that may occur within a codeblock. More...|
|#define DISABLE_ASSERTS AssertDisabler assertDisabler;|
Utilize this macro to disable asserts that may occur within a codeblock.
The intent is that this macro will only ever be used by ATPs when testing failure scenarios. No delivered code should ever utilize this macro. This macro can only be used once within a codeblock and will disable any assert that may occur within the context of that codeblock. Usage within Nested codeblocks and method calls are valid. Let's assume the following method exists in a library
Aside from logging and returning the specified ERROR, the PRECONDITION macro will assert in debug builds when argument <= 0. Now let's assume you wanted to write a test case that validated this expected failure condition. You would encounter problems in a debug build because the assertion dialog would display and interrupt a test that was designed to target this failure. You can DISABLE_ASSERTS in the context of executing this method from your test in order to prevent such scenario from occuring.