| 1 | #ifndef BANDIT_ADAPTERS_SNOWHOUSE_H |
|---|---|
| 2 | #define BANDIT_ADAPTERS_SNOWHOUSE_H |
| 3 | |
| 4 | #include <bandit/adapters/adapter.h> |
| 5 | #include <bandit/assertion_exception.h> |
| 6 | #include <bandit/assertion_frameworks/snowhouse/snowhouse/snowhouse.h> |
| 7 | |
| 8 | namespace bandit { |
| 9 | namespace adapters { |
| 10 | struct snowhouse_adapter : public assertion_adapter { |
| 11 | void adapt_exceptions(detail::voidfunc_t func) override { |
| 12 | try { |
| 13 | func(); |
| 14 | } catch (const snowhouse::AssertionException& ex) { |
| 15 | throw bandit::detail::assertion_exception(ex.GetMessage(), ex.GetFilename(), ex.GetLineNumber()); |
| 16 | } |
| 17 | } |
| 18 | }; |
| 19 | } |
| 20 | } |
| 21 | #endif |
| 22 |