blob: eab36af90930b2d7cf2338df9357d992a3fdc5b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// The Set constructor creates an empty Set by default.
load(libdir + "asserts.js");
var s = new Set();
assertEq(s.size, 0);
s = new Set(undefined);
assertEq(s.size, 0);
s = new Set(null);
assertEq(s.size, 0);
assertThrowsInstanceOf(() => Set(), TypeError);
assertThrowsInstanceOf(() => Set(undefined), TypeError);
assertThrowsInstanceOf(() => Set(null), TypeError);
|