aboutsummaryrefslogtreecommitdiff
path: root/src/stable/unitsuite.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2019-05-25 15:47:58 -0700
committerMike Buland <eichlan@xagasoft.com>2019-05-25 15:47:58 -0700
commitc4c34c1bfe568b653399cb5349ce54b5ee1c519b (patch)
tree4650a248020f89c64fc3919618987ef4c8961cf6 /src/stable/unitsuite.h
parent00cef0e9a21e1ee07d622bb05c3a7e4e56425723 (diff)
downloadlibbu++-c4c34c1bfe568b653399cb5349ce54b5ee1c519b.tar.gz
libbu++-c4c34c1bfe568b653399cb5349ce54b5ee1c519b.tar.bz2
libbu++-c4c34c1bfe568b653399cb5349ce54b5ee1c519b.tar.xz
libbu++-c4c34c1bfe568b653399cb5349ce54b5ee1c519b.zip
Augmented UnitSuite, added more to Blob, and added tests.
Diffstat (limited to 'src/stable/unitsuite.h')
-rw-r--r--src/stable/unitsuite.h10
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 & ) { } \
147catch(...) { \
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