MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / AssertionHandler

Class AssertionHandler

tests/catch.hpp:2158–2195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2156 };
2157
2158 class AssertionHandler {
2159 AssertionInfo m_assertionInfo;
2160 AssertionReaction m_reaction;
2161 bool m_completed = false;
2162 IResultCapture& m_resultCapture;
2163
2164 public:
2165 AssertionHandler
2166 ( StringRef const& macroName,
2167 SourceLineInfo const& lineInfo,
2168 StringRef capturedExpression,
2169 ResultDisposition::Flags resultDisposition );
2170 ~AssertionHandler() {
2171 if ( !m_completed ) {
2172 m_resultCapture.handleIncomplete( m_assertionInfo );
2173 }
2174 }
2175
2176 template<typename T>
2177 void handleExpr( ExprLhs<T> const& expr ) {
2178 handleExpr( expr.makeUnaryExpr() );
2179 }
2180 void handleExpr( ITransientExpression const& expr );
2181
2182 void handleMessage(ResultWas::OfType resultType, StringRef const& message);
2183
2184 void handleExceptionThrownAsExpected();
2185 void handleUnexpectedExceptionNotThrown();
2186 void handleExceptionNotThrownAsExpected();
2187 void handleThrowingCallSkipped();
2188 void handleUnexpectedInflightException();
2189
2190 void complete();
2191 void setCompleted();
2192
2193 // query
2194 auto allowThrows() const -> bool;
2195 };
2196
2197 void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef const& matcherString );
2198

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected