diff options
Diffstat (limited to 'src/stable/unitsuite.h')
-rw-r--r-- | src/stable/unitsuite.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stable/unitsuite.h b/src/stable/unitsuite.h index 85060c0..5f84058 100644 --- a/src/stable/unitsuite.h +++ b/src/stable/unitsuite.h | |||
@@ -138,6 +138,16 @@ Bu::Formatter &operator<<( Bu::Formatter &f, const Bu::UnitSuite::Expect &e ); | |||
138 | { \ | 138 | { \ |
139 | throw Bu::UnitSuite::Failed( #tst, __FILE__, __LINE__ ); \ | 139 | throw Bu::UnitSuite::Failed( #tst, __FILE__, __LINE__ ); \ |
140 | } else (void)0 | 140 | } else (void)0 |
141 | |||
142 | #define unitTestCatch( tst, exception ) try \ | ||
143 | { \ | ||
144 | tst; \ | ||
145 | throw Bu::UnitSuite::Failed( #tst, __FILE__, __LINE__ ); \ | ||
146 | } catch( exception & ) { } \ | ||
147 | catch(...) { \ | ||
148 | throw Bu::UnitSuite::Failed( #tst, __FILE__, __LINE__ ); \ | ||
149 | } (void)0 | ||
150 | |||
141 | #define unitFailed( msg ) throw Bu::UnitSuite::Failed(msg, __FILE__, __LINE__) | 151 | #define unitFailed( msg ) throw Bu::UnitSuite::Failed(msg, __FILE__, __LINE__) |
142 | 152 | ||
143 | #endif | 153 | #endif |