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:
Rick Waldron 2022-09-22 17:01:04 -07:00 committed by Ms2ger
parent 145c440069
commit 735f95adf5
22 changed files with 22 additions and 11 deletions

View File

@ -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 = {};

View File

@ -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() {

View File

@ -18,6 +18,7 @@ info: |
ii. Set p.[[value]] to empty.
iii. Return true.
...
features: [WeakMap]
---*/
var foo = {};

View File

@ -18,6 +18,7 @@ info: |
ii. Set p.[[value]] to empty.
iii. Return true.
...
features: [WeakMap]
---*/
var foo = {};

View File

@ -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();

View File

@ -10,6 +10,7 @@ info: |
...
7. Return false.
features: [WeakMap]
---*/
var map = new WeakMap();

View File

@ -12,7 +12,7 @@ info: |
slot.
5. If Type(key) is not Object, return undefined.
...
features: [Symbol]
features: [Symbol, WeakMap]
---*/
var map = new WeakMap();

View File

@ -16,6 +16,7 @@ info: |
p.[[value]].
7. Return undefined.
...
features: [WeakMap]
---*/
var map = new WeakMap();

View File

@ -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 = {};

View File

@ -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();

View File

@ -9,7 +9,7 @@ info: |
...
7. Return false.
features: [WeakMap]
---*/
var foo = {};

View File

@ -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 = {};

View File

@ -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();

View File

@ -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();

View File

@ -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 = {};

View File

@ -10,6 +10,7 @@ info: |
...
7. Append value as the last element of entries.
...
features: [WeakSet]
---*/
var s = new WeakSet();

View File

@ -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();

View File

@ -16,7 +16,7 @@ info: |
value is empty.
ii. Return true.
...
features: [WeakSet]
---*/
var foo = {};

View File

@ -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();

View File

@ -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();

View File

@ -9,7 +9,7 @@ info: |
...
7. Return false.
features: [WeakSet]
---*/
var foo = {};

View File

@ -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 = {};