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

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

Issue 203243004: Implement ES6 symbol registry and predefined symbols (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed bug Created 6 years, 9 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
Index: test/mjsunit/harmony/private.js
diff --git a/test/mjsunit/harmony/private.js b/test/mjsunit/harmony/private.js
index 9c9bf2c14fe78d366900d58a3659306605fb8bf8..a14afe04e5f90fc5691c00311c6b63793c3b1204 100644
--- a/test/mjsunit/harmony/private.js
+++ b/test/mjsunit/harmony/private.js
@@ -328,3 +328,17 @@ function TestCachedKeyAfterScavenge() {
}
}
TestCachedKeyAfterScavenge();
+
+
+function TestGetOwnPropertySymbols() {
+ var privateSymbol = %CreatePrivateSymbol("private")
+ var publicSymbol = Symbol()
+ var publicSymbol2 = Symbol()
+ var obj = {}
+ obj[publicSymbol] = 1
+ obj[privateSymbol] = 2
+ obj[publicSymbol2] = 3
+ var syms = Object.getOwnPropertySymbols(obj)
+ assertEquals(syms, [publicSymbol, publicSymbol2])
+}
+TestGetOwnPropertySymbols()
« src/symbol.js ('K') | « src/symbol.js ('k') | test/mjsunit/harmony/symbols.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698