Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-12203

bson_validate unit test needs some work

    • 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

            Assignee:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: