Index: test/mjsunit/es6/symbols.js |
diff --git a/test/mjsunit/es6/symbols.js b/test/mjsunit/es6/symbols.js |
index d071cbc01a2bd4280a5507c818451202e7a42c83..d502a836816b9d7730d73fbe6b24f306bd418d41 100644 |
--- a/test/mjsunit/es6/symbols.js |
+++ b/test/mjsunit/es6/symbols.js |
@@ -549,3 +549,16 @@ function TestContext() { |
assertFalse(verifier(rSymbol, TypeError())); |
} |
TestContext(); |
+ |
+ |
+function TestStringify(expected, input) { |
+ assertEquals(expected, JSON.stringify(input)); |
+ assertEquals(expected, JSON.stringify(input, null, 0)); |
+} |
+ |
+TestStringify(undefined, Symbol("a")); |
+TestStringify('[{}]', [Object(Symbol())]); |
+var symbol_wrapper = Object(Symbol("a")) |
+TestStringify('{}', symbol_wrapper); |
+symbol_wrapper.a = 1; |
+TestStringify('{"a":1}', symbol_wrapper); |