blob: a1fab07546aad8286165f8e3facda308de5167b4 (
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-weakmap.prototype.has
description: >
Return false when an Object key is not present in the WeakMap entries.
info: |
WeakMap.prototype.has ( _key_ )
6. Return *false*.
features: [WeakMap]
---*/
var foo = {};
var bar = {};
var map = new WeakMap();
assert.sameValue(map.has(foo), false);
map.set(foo, 1);
assert.sameValue(map.has(bar), false);
map.delete(foo);
assert.sameValue(map.has(foo), false);
reportCompare(0, 0);
|