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

assert.neq() does shallow inequality check for objects

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.7.3
    • None
    • Shell
    • Fully Compatible
    • ALL
    • TIG 2018-02-26

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: