-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
Platforms 2017-06-19
Many of the tests compare the output of BSONObj::valid() with validateBSON under the assumption that they are different implementations[1]. This assumption was invalidated when BSONObj::valid was reimplemented as a thin wrapper around validateBSON[2]. This makes the current tests the equivalent of ASSERT_EQUALS(validateBSON(), validateBSON()) which isn't really testing anything.
[1] https://github.com/mongodb/mongo/blob/master/src/mongo/bson/bson_validate_test.cpp#L156-158
[2] https://github.com/mongodb/mongo/blob/master/src/mongo/db/jsobj.cpp#L495-497