summaryrefslogtreecommitdiff
path: root/src/mongo/unittest/bson_test_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/unittest/bson_test_util.h')
-rw-r--r--src/mongo/unittest/bson_test_util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/unittest/bson_test_util.h b/src/mongo/unittest/bson_test_util.h
index 2e7c928c339..ff4b58b5f7b 100644
--- a/src/mongo/unittest/bson_test_util.h
+++ b/src/mongo/unittest/bson_test_util.h
@@ -29,6 +29,7 @@
#pragma once
+#include "mongo/bson/json.h"
#include "mongo/bson/simple_bsonelement_comparator.h"
#include "mongo/bson/simple_bsonobj_comparator.h"
#include "mongo/unittest/unittest.h"
@@ -90,5 +91,9 @@ DECLARE_BSON_CMP_FUNC(BSONElement, GTE);
DECLARE_BSON_CMP_FUNC(BSONElement, NE);
#undef DECLARE_BSON_CMP_FUNC
+// TODO SERVER-87736 this macro is misleading on the v6 .0 branch.We will keep it as "AUTO" for now,
+// but there is no 'auto' support on this branch.
+#define ASSERT_BSONOBJ_EQ_AUTO(expected, actual) ASSERT_BSONOBJ_EQ(fromjson(expected), actual)
+
} // namespace unittest
} // namespace mongo