Index: test/mjsunit/json2.js |
diff --git a/test/mjsunit/json2.js b/test/mjsunit/json2.js |
index f68c76c92ad563540f9ba8c7ec1e7ef468375fdd..75e25f89242414ebc976cb768d750b7b604d53e1 100644 |
--- a/test/mjsunit/json2.js |
+++ b/test/mjsunit/json2.js |
@@ -35,7 +35,9 @@ assertTrue(JSON.stringify(this, null, 0).indexOf('"a":12345') > 0); |
// Test JSON.stringify of array in dictionary mode. |
function TestStringify(expected, input) { |
assertEquals(expected, JSON.stringify(input)); |
- assertEquals(expected, JSON.stringify(input, null, 0)); |
+ assertEquals(expected, JSON.stringify(input, (key, value) => value)); |
+ assertEquals(JSON.stringify(input, null, "="), |
+ JSON.stringify(input, (key, value) => value, "=")); |
} |
var array_1 = []; |
@@ -76,7 +78,7 @@ var getter_obj = { get getter() { |
return 123; |
} }; |
TestStringify('{"getter":123}', getter_obj); |
-assertEquals(2, counter); |
+assertEquals(4, counter); |
// Test toJSON function. |
var tojson_obj = { toJSON: function() { |
@@ -85,7 +87,7 @@ var tojson_obj = { toJSON: function() { |
}, |
a: 1}; |
TestStringify('[1,2]', tojson_obj); |
-assertEquals(4, counter); |
+assertEquals(8, counter); |
// Test that we don't recursively look for the toJSON function. |
var tojson_proto_obj = { a: 'fail' }; |