blob: 61bb52e68bd1a2a0052b353cb93c708ec12473e3 (
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
|
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-weakset.prototype.has
description: >
Return false when an Object value is not present in the WeakSet entries.
info: |
WeakSet.prototype.has ( _value_ )
6. Return *false*.
features: [WeakSet]
---*/
var foo = {};
var bar = {};
var s = new WeakSet();
assert.sameValue(s.has(foo), false);
s.add(foo);
assert.sameValue(s.has(bar), false);
s.delete(foo);
assert.sameValue(s.has(foo), false);
reportCompare(0, 0);
|