blob: bd8eccb40537f6e7a927619a82ec02897c7fb9d9 [file] [log] [blame]
// 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: >
Returns false if value is not an Object.
info: |
WeakMap.prototype.has ( value )
5. If Type(key) is not Object, return false.
features: [Symbol]
---*/
var map = new WeakMap();
assert.sameValue(map.has(1), false);
assert.sameValue(map.has(''), false);
assert.sameValue(map.has(null), false);
assert.sameValue(map.has(undefined), false);
assert.sameValue(map.has(true), false);
assert.sameValue(map.has(Symbol()), false);