Sign in
cobalt
/
cobalt
/
c73ce7d5dfce7ae20bcc30efc5f220e0fbac12b1
/
.
/
src
/
third_party
/
mozjs-45
/
js
/
src
/
jit-test
/
tests
/
collections
/
Set-constructor-generator-2.js
blob: 13660ac25a1a0d4f4b63494beb092b747ac0baf8 [
file
] [
log
] [
blame
]
// The argument to Set can be a generator-expression.
var
s
=
new
Set
(
k
*
k
for
(
k of
[
1
,
2
,
3
,
4
]));
assertEq
(
s
.
size
,
4
);
assertEq
(
s
.
has
(
1
),
true
);
assertEq
(
s
.
has
(
4
),
true
);
assertEq
(
s
.
has
(
9
),
true
);
assertEq
(
s
.
has
(
16
),
true
);