test: improve comparison coverage to 100%

PR-URL: https://github.com/nodejs/node/pull/24749
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
Ruben Bridgewater 2018-11-30 10:23:07 +01:00
parent 4dd56a39f1
commit 2f11fe3663
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -239,6 +239,7 @@ assertNotDeepOrStrict(new Set([1, 2, 3, 4]), new Set([1, 2, 3]));
assertDeepAndStrictEqual(new Set(['1', '2', '3']), new Set(['1', '2', '3']));
assertDeepAndStrictEqual(new Set([[1, 2], [3, 4]]), new Set([[3, 4], [1, 2]]));
assertNotDeepOrStrict(new Set([{ a: 0 }]), new Set([{ a: 1 }]));
assertNotDeepOrStrict(new Set([Symbol()]), new Set([Symbol()]));
{
const a = [ 1, 2 ];
@ -636,6 +637,8 @@ assertDeepAndStrictEqual(-0, -0);
Object.defineProperty(obj2, Symbol(), { value: 1 });
assertOnlyDeepEqual(obj1, obj3);
assertDeepAndStrictEqual(obj1, obj2);
obj2[Symbol()] = true;
assertOnlyDeepEqual(obj1, obj2);
// TypedArrays have a fast path. Test for this as well.
const a = new Uint8Array(4);
const b = new Uint8Array(4);