diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2017-05-12 10:34:39 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2017-05-12 10:34:39 -0400 |
commit | 107b0bdf954bed554cf74a69a3fec268ac00886b (patch) | |
tree | 5d104e40d1c605b88a86d0ce77498cd372ed4414 /src/mongo/idl/idl_test.cpp | |
parent | 164d4720b9d81ca5f9deea702b66438a6fa8072c (diff) | |
download | mongo-107b0bdf954bed554cf74a69a3fec268ac00886b.tar.gz |
SERVER-29081 Add toBSON to IDL generated classes
Diffstat (limited to 'src/mongo/idl/idl_test.cpp')
-rw-r--r-- | src/mongo/idl/idl_test.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/idl/idl_test.cpp b/src/mongo/idl/idl_test.cpp index 80d5fa721f5..010aa5a30ac 100644 --- a/src/mongo/idl/idl_test.cpp +++ b/src/mongo/idl/idl_test.cpp @@ -100,6 +100,13 @@ void TestLoopback(TestT test_value) { ASSERT_BSONOBJ_EQ(testDoc, loopbackDoc); } + // Positive: Test we can roundtrip from the just parsed document + { + auto loopbackDoc = testStruct.toBSON(); + + ASSERT_BSONOBJ_EQ(testDoc, loopbackDoc); + } + // Positive: Test we can serialize from nothing the same document { BSONObjBuilder builder; |