[#BloombergLP-bsls-ProtocolTest] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::ProtocolTest :relfileprefix: ../../ :mrdocs: Mechanism that tests protocol‐class concerns via `test*` methods and `operator‐>`. == Synopsis Declared in `<bsls_protocoltest.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class BSLS_TESTIMP> class ProtocolTest; ---- == Description This mechanism class template provides the implementation of protocol testing concerns via `test*` methods (for non‐method concerns), and via `operator‐>` (for method concerns). The `BSLS_TESTIMP` template parameter is required to be a class derived from `ProtocolTestImp` that provides test implementations of all protocol methods. == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/ProtocolTest/2constructor.adoc[`ProtocolTest`] [.small]#[constructor]# | Construct a `ProtocolTest` object. | xref:BloombergLP/bsls/ProtocolTest/failures.adoc[`failures`] | Return the number of failures encountered during testing of a protocol class. The returned value is 0 if all tests succeeded, or no tests ran. | xref:BloombergLP/bsls/ProtocolTest/lastStatus.adoc[`lastStatus`] | Return `true` if the last test completed successfully (or no test has yes completed) and `false` otherwise. | xref:BloombergLP/bsls/ProtocolTest/method.adoc[`method`] | Return a `BSLS_TESTIMP` object to perform testing of a specific method. | xref:BloombergLP/bsls/ProtocolTest/testAbstract.adoc[`testAbstract`] | Return whether the protocol class being tested is abstract. | xref:BloombergLP/bsls/ProtocolTest/testNoDataMembers.adoc[`testNoDataMembers`] | Return whether the protocol class being tested contains no data fields. | xref:BloombergLP/bsls/ProtocolTest/testVirtualDestructor.adoc[`testVirtualDestructor`] | Return whether the protocol class being tested has a virtual destructor. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#