summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/logv2/logv2_test.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/logv2/logv2_test.cpp b/src/mongo/logv2/logv2_test.cpp
index e6139d964be..20884459b06 100644
--- a/src/mongo/logv2/logv2_test.cpp
+++ b/src/mongo/logv2/logv2_test.cpp
@@ -127,11 +127,6 @@ struct TypeWithBSON : TypeWithoutBSON {
}
};
-struct TypeWithOnlyBSON : private TypeWithBSON {
- using TypeWithBSON::toBSON;
- using TypeWithBSON::TypeWithBSON;
-};
-
struct TypeWithBSONSerialize : TypeWithoutBSON {
using TypeWithoutBSON::TypeWithoutBSON;
@@ -1799,7 +1794,12 @@ TEST_F(UnstructuredLoggingTest, UserToString) {
}
TEST_F(UnstructuredLoggingTest, UserToBSON) {
- TypeWithOnlyBSON arg(1.0, 2.0);
+ struct TypeWithOnlyBSON {
+ BSONObj toBSON() const {
+ return BSONObjBuilder{}.append("x", 1).append("y", 2).obj();
+ }
+ };
+ TypeWithOnlyBSON arg;
logd("{}", arg); // NOLINT
validate([&arg](const BSONObj& obj) {
ASSERT_EQUALS(obj.getField(kMessageFieldName).String(), arg.toBSON().toString());