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

Unified Diff: test/mjsunit/json.js

Issue 1922603006: [JSON] implement indentation in the BasicJsonStringifier and expose via API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 7 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 | « test/mjsunit/harmony/simd.js ('k') | test/mjsunit/json2.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/json.js
diff --git a/test/mjsunit/json.js b/test/mjsunit/json.js
index 84f2056856a6526f245f22b8d05c8b2ef6c3733e..44548e4c13e90ac6e297eedae20b5d8064ae34c6 100644
--- a/test/mjsunit/json.js
+++ b/test/mjsunit/json.js
@@ -234,7 +234,9 @@ TestInvalid('"Garbage""After string"');
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, "="));
}
TestStringify("true", true);
@@ -451,8 +453,8 @@ var counter = { get toJSON() { getCount++;
// RegExps are not callable, so they are stringified as objects.
TestStringify('{}', /regexp/);
TestStringify('42', counter);
-assertEquals(2, getCount);
-assertEquals(2, callCount);
+assertEquals(4, getCount);
+assertEquals(4, callCount);
var oddball2 = Object(42);
var oddball3 = Object("foo");
« no previous file with comments | « test/mjsunit/harmony/simd.js ('k') | test/mjsunit/json2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698