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

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

Issue 12459026: ES6 symbols: implement name property (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 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
« no previous file with comments | « src/symbol.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 15f7275fac32f2c6ff71562db16e5a4a132b2aa0..1d98f548a45f57d0a27f14841928964c1c1bffd4 100644
--- a/test/mjsunit/harmony/symbols.js
+++ b/test/mjsunit/harmony/symbols.js
@@ -37,6 +37,9 @@ function TestNew() {
for (var i = 0; i < 2; ++i) {
for (var j = 0; j < 5; ++j) {
symbols.push(Symbol())
+ symbols.push(Symbol(undefined))
+ symbols.push(Symbol("66"))
+ symbols.push(Symbol(66))
symbols.push(Symbol(Symbol()))
symbols.push((new Symbol).valueOf())
symbols.push((new Symbol()).valueOf())
@@ -64,6 +67,15 @@ function TestType() {
TestType()
+function TestName() {
+ for (var i in symbols) {
+ var name = symbols[i].name
+ assertTrue(name === undefined || name === "66")
+ }
+}
+TestName()
+
+
function TestToString() {
for (var i in symbols) {
assertThrows(function() { String(symbols[i]) }, TypeError)
« no previous file with comments | « src/symbol.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698