diff options
Diffstat (limited to 'src/mongo/db/pipeline/expression_context_test.cpp')
| -rw-r--r-- | src/mongo/db/pipeline/expression_context_test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/expression_context_test.cpp b/src/mongo/db/pipeline/expression_context_test.cpp index 2ff0ef20b1e..b105dce531b 100644 --- a/src/mongo/db/pipeline/expression_context_test.cpp +++ b/src/mongo/db/pipeline/expression_context_test.cpp @@ -39,6 +39,15 @@ #include "mongo/db/vector_clock_mutable.h" #include "mongo/unittest/unittest.h" +#define ASSERT_DOES_NOT_THROW(EXPRESSION) \ + try { \ + EXPRESSION; \ + } catch (const AssertionException& e) { \ + str::stream err; \ + err << "Threw an exception incorrectly: " << e.toString(); \ + ::mongo::unittest::TestAssertionFailure(__FILE__, __LINE__, err).stream(); \ + } + namespace mongo { namespace { |
