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

assert.neq() does shallow inequality check for objects

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.3
    • Affects Version/s: None
    • Component/s: Shell
    • Fully Compatible
    • ALL
    • TIG 2018-02-26

      The assert.neq() function is implemented using Javascript !=, which performs reference inequality for objects. This is different from assert.eq(), which performs a deep comparison if the operands have unequal references. This leads to confusion in jstests, since we would expect assert.neq() to throw iff assert.eq() does not throw.

            Assignee:
            david.bradford@mongodb.com David Bradford (Inactive)
            Reporter:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: