| 2504 | }; |
| 2505 | |
| 2506 | class AssertionHandler { |
| 2507 | AssertionInfo m_assertionInfo; |
| 2508 | AssertionReaction m_reaction; |
| 2509 | bool m_completed = false; |
| 2510 | IResultCapture& m_resultCapture; |
| 2511 | |
| 2512 | public: |
| 2513 | AssertionHandler |
| 2514 | ( StringRef const& macroName, |
| 2515 | SourceLineInfo const& lineInfo, |
| 2516 | StringRef capturedExpression, |
| 2517 | ResultDisposition::Flags resultDisposition ); |
| 2518 | ~AssertionHandler() { |
| 2519 | if ( !m_completed ) { |
| 2520 | m_resultCapture.handleIncomplete( m_assertionInfo ); |
| 2521 | } |
| 2522 | } |
| 2523 | |
| 2524 | template<typename T> |
| 2525 | void handleExpr( ExprLhs<T> const& expr ) { |
| 2526 | handleExpr( expr.makeUnaryExpr() ); |
| 2527 | } |
| 2528 | void handleExpr( ITransientExpression const& expr ); |
| 2529 | |
| 2530 | void handleMessage(ResultWas::OfType resultType, StringRef const& message); |
| 2531 | |
| 2532 | void handleExceptionThrownAsExpected(); |
| 2533 | void handleUnexpectedExceptionNotThrown(); |
| 2534 | void handleExceptionNotThrownAsExpected(); |
| 2535 | void handleThrowingCallSkipped(); |
| 2536 | void handleUnexpectedInflightException(); |
| 2537 | |
| 2538 | void complete(); |
| 2539 | void setCompleted(); |
| 2540 | |
| 2541 | // query |
| 2542 | auto allowThrows() const -> bool; |
| 2543 | }; |
| 2544 | |
| 2545 | void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef const& matcherString ); |
| 2546 |
nothing calls this directly
no outgoing calls
no test coverage detected