[#BloombergLP-bsls-AssertTest]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::AssertTest
:relfileprefix: ../../
:mrdocs:

Utility providing methods for negative testing of assertion macros&period;

== Synopsis

Declared in `&lt;bsls&lowbar;asserttest&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct AssertTest;
----

== Description

This utility `struct` provides a suite of methods designed for use in conjunction with preprocessor macros during the negative testing of defensive checks using the facilities provided by the `bsls&lowbar;assert` component&period; Unlike usual BDE functionality methods in this `struct` provide wide contracts because they need to function without assertion failures during testing, under unforeseen circumstances&period;

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/AssertTest/catchProbe.adoc[`catchProbe`] 
| Return whether a caught assertion failure matches the expected probe&period;
| xref:BloombergLP/bsls/AssertTest/catchProbeRaw.adoc[`catchProbeRaw`] 
| Return whether a caught assertion matches a raw failure probe&period;
| xref:BloombergLP/bsls/AssertTest/failTestDriver.adoc[`failTestDriver`]  [.small]#[noreturn]#
| Throw or abort in response to an assertion violation&period;
| xref:BloombergLP/bsls/AssertTest/failTestDriverByReview.adoc[`failTestDriverByReview`] 
| Throw or abort in response to a review violation&period;
| xref:BloombergLP/bsls/AssertTest/isValidAssertBuild.adoc[`isValidAssertBuild`] 
| Return whether `specString` is a valid assertion build&hyphen;type specifier&period;
| xref:BloombergLP/bsls/AssertTest/isValidExpected.adoc[`isValidExpected`] 
| Return whether `specChar` is a valid expected&hyphen;result specifier&period;
| xref:BloombergLP/bsls/AssertTest/isValidExpectedLevel.adoc[`isValidExpectedLevel`] 
| Return whether `specChar` is a valid expected assertion level&period;
| xref:BloombergLP/bsls/AssertTest/tryProbe.adoc[`tryProbe`] 
| Return whether a pass&hyphen;probe specification is valid&period;
| xref:BloombergLP/bsls/AssertTest/tryProbeRaw.adoc[`tryProbeRaw`] 
| Return whether a raw pass&hyphen;probe specification is valid&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
