Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Unified Diff: test/mjsunit/harmony/symbols.js

Issue 12455002: ES6 symbols: filter symbols form for-in loops and Object.keys (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/v8natives.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/symbols.js
diff --git a/test/mjsunit/harmony/symbols.js b/test/mjsunit/harmony/symbols.js
index b35d950981ba1f119cbc71a88a8eb21eca9f9a38..4ed44abc8f10daedf1f8d4b91f4b62d80c64004c 100644
--- a/test/mjsunit/harmony/symbols.js
+++ b/test/mjsunit/harmony/symbols.js
@@ -162,26 +162,14 @@ function TestKeyHas() {
function TestKeyEnum(obj) {
- // TODO(rossberg): symbols should not show up at all in for-in.
- var found = [];
- names: for (var name in obj) {
- for (var i in symbols) {
- if (name === symbols[i]) {
- found[i] = true;
- continue names;
- }
- }
- }
- // All even symbols should have been enumerated.
- for (var i = 0; i < symbols.length; i += 2) {
- assertTrue(i in found)
+ for (var name in obj) {
+ assertFalse(%_IsSymbol(name))
}
}
function TestKeyKeys(obj) {
- // TODO(rossberg): symbols should not be returned by Object.keys.
- assertEquals(symbols.length / 2, Object.keys(obj).length)
+ assertEquals(0, Object.keys(obj).length)
assertTrue(symbols.length <= Object.getOwnPropertyNames(obj).length)
}
« no previous file with comments | « src/v8natives.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698