Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating v8-symbols.js #1662

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions tests/testsrc/jstests/harmony/v8-symbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,37 +245,35 @@ function TestCall() {
TestCall()


/*
* TODO Rhino not implemented
/* Rhino changed - weakmap does not support symbol keys */
function TestCollections() {
var set = new Set
var map = new Map
var weakmap = new WeakMap
for (var i in symbols) {
set.add(symbols[i])
map.set(symbols[i], i)
weakmap.set(symbols[i], i)
/* weakmap.set(symbols[i], i) */
}
assertEquals(symbols.length, set.size)
assertEquals(symbols.length, map.size)
for (var i in symbols) {
assertTrue(set.has(symbols[i]))
assertTrue(map.has(symbols[i]))
assertTrue(weakmap.has(symbols[i]))
/* assertTrue(weakmap.has(symbols[i])) */
assertEquals(i, map.get(symbols[i]))
assertEquals(i, weakmap.get(symbols[i]))
/* assertEquals(i, weakmap.get(symbols[i])) */
}
for (var i in symbols) {
assertTrue(set.delete(symbols[i]))
assertTrue(map.delete(symbols[i]))
assertTrue(weakmap.delete(symbols[i]))
/* assertTrue(weakmap.delete(symbols[i])) */
}
assertEquals(0, set.size)
assertEquals(0, map.size)
}
TestCollections()

*/

function TestKeySet(obj) {
//assertTrue(%HasFastProperties(obj))
Expand Down Expand Up @@ -364,9 +362,7 @@ function TestKeyDelete(obj) {
}
}

// TODO Rhino no Map
//var objs = [{}, [], Object.create(null), Object(1), new Map, function(){}]
var objs = [{}, [], Object.create(null), Object(1), function(){}]
var objs = [{}, [], Object.create(null), Object(1), new Map, function(){}]

for (var i in objs) {
//print('Testing ' + i + ' (' + typeof i + ')');
Expand Down
Loading