mirror of https://github.com/tc39/test262.git
Add WeakMap and WeakSet features to tests affected by symbols-as-weakmap-keys
Originally taken from Rick's draft commit for symbols-as-weakmap-keys tests.
This commit is contained in:
parent
145c440069
commit
735f95adf5
|
@ -11,6 +11,7 @@ info: |
|
|||
9. Repeat
|
||||
k. Let status be Call(adder, map, «k.[[value]], v.[[value]]»).
|
||||
l. If status is an abrupt completion, return IteratorClose(iter, status).
|
||||
features: [WeakMap]
|
||||
---*/
|
||||
|
||||
var first = {};
|
||||
|
|
|
@ -16,7 +16,7 @@ info: |
|
|||
i. Let error be Completion{[[type]]: throw, [[value]]: a newly created
|
||||
TypeError object, [[target]]:empty}.
|
||||
ii. Return IteratorClose(iter, error).
|
||||
features: [Symbol]
|
||||
features: [Symbol, WeakMap]
|
||||
---*/
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
|
|
|
@ -18,6 +18,7 @@ info: |
|
|||
ii. Set p.[[value]] to empty.
|
||||
iii. Return true.
|
||||
...
|
||||
features: [WeakMap]
|
||||
---*/
|
||||
|
||||
var foo = {};
|
||||
|
|
|
@ -18,6 +18,7 @@ info: |
|
|||
ii. Set p.[[value]] to empty.
|
||||
iii. Return true.
|
||||
...
|
||||
features: [WeakMap]
|
||||
---*/
|
||||
|
||||
var foo = {};
|
||||
|
|
|
@ -8,7 +8,7 @@ info: |
|
|||
WeakMap.prototype.delete ( value )
|
||||
|
||||
5. If Type(key) is not Object, return false.
|
||||
features: [Symbol]
|
||||
features: [Symbol, WeakMap]
|
||||
---*/
|
||||
|
||||
var map = new WeakMap();
|
||||
|
|
|
@ -10,6 +10,7 @@ info: |
|
|||
...
|
||||
7. Return false.
|
||||
|
||||
features: [WeakMap]
|
||||
---*/
|
||||
|
||||
var map = new WeakMap();
|
||||
|
|
|
@ -12,7 +12,7 @@ info: |
|
|||
slot.
|
||||
5. If Type(key) is not Object, return undefined.
|
||||
...
|
||||
features: [Symbol]
|
||||
features: [Symbol, WeakMap]
|
||||
---*/
|
||||
|
||||
var map = new WeakMap();
|
||||
|
|
|
@ -16,6 +16,7 @@ info: |
|
|||
p.[[value]].
|
||||
7. Return undefined.
|
||||
...
|
||||
features: [WeakMap]
|
||||
---*/
|
||||
|
||||
var map = new WeakMap();
|
||||
|
|
|
@ -15,6 +15,7 @@ info: |
|
|||
a. If p.[[key]] is not empty and SameValue(p.[[key]], key) is true, return
|
||||
p.[[value]].
|
||||
...
|
||||
features: [WeakMap]
|
||||
---*/
|
||||
|
||||
var foo = {};
|
||||
|
|
|
@ -8,7 +8,7 @@ info: |
|
|||
WeakMap.prototype.has ( value )
|
||||
|
||||
5. If Type(key) is not Object, return false.
|
||||
features: [Symbol]
|
||||
features: [Symbol, WeakMap]
|
||||
---*/
|
||||
|
||||
var map = new WeakMap();
|
||||
|
|
|
@ -9,7 +9,7 @@ info: |
|
|||
|
||||
...
|
||||
7. Return false.
|
||||
|
||||
features: [WeakMap]
|
||||
---*/
|
||||
|
||||
var foo = {};
|
||||
|
|
|
@ -13,6 +13,7 @@ info: |
|
|||
a. If p.[[key]] is not empty and SameValue(p.[[key]], key) is true, return
|
||||
true.
|
||||
...
|
||||
features: [WeakMap]
|
||||
---*/
|
||||
|
||||
var foo = {};
|
||||
|
|
|
@ -11,6 +11,7 @@ info: |
|
|||
7. Let p be the Record {[[key]]: key, [[value]]: value}.
|
||||
8. Append p as the last element of entries.
|
||||
...
|
||||
features: [WeakMap]
|
||||
---*/
|
||||
|
||||
var map = new WeakMap();
|
||||
|
|
|
@ -7,7 +7,7 @@ info: |
|
|||
WeakMap.prototype.set ( key, value )
|
||||
|
||||
5. If Type(key) is not Object, throw a TypeError exception.
|
||||
features: [Symbol]
|
||||
features: [Symbol, WeakMap]
|
||||
---*/
|
||||
|
||||
var s = new WeakMap();
|
||||
|
|
|
@ -11,6 +11,7 @@ info: |
|
|||
9. Repeat
|
||||
f. Let status be Call(adder, set, «nextValue»).
|
||||
g. If status is an abrupt completion, return IteratorClose(iter, status).
|
||||
features: [WeakSet]
|
||||
---*/
|
||||
|
||||
var first = {};
|
||||
|
|
|
@ -10,6 +10,7 @@ info: |
|
|||
...
|
||||
7. Append value as the last element of entries.
|
||||
...
|
||||
features: [WeakSet]
|
||||
---*/
|
||||
|
||||
var s = new WeakSet();
|
||||
|
|
|
@ -7,7 +7,7 @@ info: |
|
|||
WeakSet.prototype.add ( value )
|
||||
|
||||
4. If Type(value) is not Object, throw a TypeError exception.
|
||||
features: [Symbol]
|
||||
features: [Symbol, WeakSet]
|
||||
---*/
|
||||
|
||||
var s = new WeakSet();
|
||||
|
|
|
@ -16,7 +16,7 @@ info: |
|
|||
value is empty.
|
||||
ii. Return true.
|
||||
...
|
||||
|
||||
features: [WeakSet]
|
||||
---*/
|
||||
|
||||
var foo = {};
|
||||
|
|
|
@ -8,7 +8,7 @@ info: |
|
|||
WeakSet.prototype.delete ( value )
|
||||
|
||||
4. If Type(value) is not Object, return false.
|
||||
features: [Symbol]
|
||||
features: [Symbol, WeakSet]
|
||||
---*/
|
||||
|
||||
var s = new WeakSet();
|
||||
|
|
|
@ -8,7 +8,7 @@ info: |
|
|||
WeakSet.prototype.has ( value )
|
||||
|
||||
5. If Type(value) is not Object, return false.
|
||||
features: [Symbol]
|
||||
features: [Symbol, WeakSet]
|
||||
---*/
|
||||
|
||||
var s = new WeakSet();
|
||||
|
|
|
@ -9,7 +9,7 @@ info: |
|
|||
|
||||
...
|
||||
7. Return false.
|
||||
|
||||
features: [WeakSet]
|
||||
---*/
|
||||
|
||||
var foo = {};
|
||||
|
|
|
@ -11,6 +11,7 @@ info: |
|
|||
6. Repeat for each e that is an element of entries,
|
||||
a. If e is not empty and SameValue(e, value) is true, return true.
|
||||
...
|
||||
features: [WeakSet]
|
||||
---*/
|
||||
|
||||
var foo = {};
|
||||
|
|
Loading…
Reference in New Issue