[SERVER-32393] assert.neq() does shallow inequality check for objects Created: 18/Dec/17 Updated: 30/Oct/23 Resolved: 20/Feb/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tess Avitabile (Inactive) | Assignee: | David Bradford (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | tig-assertjs | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | TIG 2018-02-26 | ||||||||
| Participants: | |||||||||
| 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. |
| Comments |
| Comment by Githook User [ 20/Feb/18 ] |
|
Author: {'email': 'david.bradford@mongodb.com', 'name': 'David Bradford', 'username': 'dbradf'}Message: |
| Comment by Max Hirschhorn [ 31/Dec/17 ] |
ian.whalen, I would say so. |
| Comment by Ian Whalen (Inactive) [ 21/Dec/17 ] |
|
max.hirschhorn does TIG have time to pick this up in 3.7? |