summaryrefslogtreecommitdiff
path: root/src/mongo/db/update/update_driver_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/update/update_driver_test.cpp')
-rw-r--r--src/mongo/db/update/update_driver_test.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/update/update_driver_test.cpp b/src/mongo/db/update/update_driver_test.cpp
index 86f6ae492bf..2d03e4b7886 100644
--- a/src/mongo/db/update/update_driver_test.cpp
+++ b/src/mongo/db/update/update_driver_test.cpp
@@ -46,6 +46,15 @@
#include "mongo/db/update_index_data.h"
#include "mongo/unittest/unittest.h"
+#define ASSERT_DOES_NOT_THROW(EXPRESSION) \
+ try { \
+ EXPRESSION; \
+ } catch (const AssertionException& e) { \
+ ::mongo::str::stream err; \
+ err << "Threw an exception incorrectly: " << e.toString(); \
+ ::mongo::unittest::TestAssertionFailure(__FILE__, __LINE__, err).stream(); \
+ }
+
namespace mongo {
namespace {