summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Set/prototype/isDisjointFrom/compares-empty-sets.js
blob: 4138598a3a7d0165b5fa0155e29e1e218dd385ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// |reftest| skip -- set-methods is not supported
// Copyright (C) 2023 Anthony Frehner and Kevin Gibbons. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-set.prototype.isdisjointfrom
description: Set.prototype.isDisjointFrom can compare empty Sets
features: [set-methods]
---*/

const s1 = new Set([]);
const s2 = new Set([1, 2]);

assert.sameValue(s1.isDisjointFrom(s2), true);

const s3 = new Set([1, 2]);
const s4 = new Set([]);

assert.sameValue(s3.isDisjointFrom(s4), true);

const s5 = new Set([]);
const s6 = new Set([]);

assert.sameValue(s5.isDisjointFrom(s6), true);

reportCompare(0, 0);