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

Unified Diff: test/mjsunit/json.js

Issue 8888006: Make more JS files beter match the coding standard. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years 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/json.js
diff --git a/test/mjsunit/json.js b/test/mjsunit/json.js
index bead376f84da7b82796ec6cdd18ab94a26254bc8..9f7d31b16431ab3a1c8c1f94b62cfc6dd6d69c89 100644
--- a/test/mjsunit/json.js
+++ b/test/mjsunit/json.js
@@ -329,10 +329,14 @@ for (var i = 0; i < 65536; i++) {
expected = '\\' + string;
} else if ("\b\t\n\r\f".indexOf(string) >= 0) {
// Step 2.b
- if (string == '\b') expected = '\\b';
- else if (string == '\t') expected = '\\t';
- else if (string == '\n') expected = '\\n';
- else if (string == '\f') expected = '\\f';
+ if (string == '\b') { expected = '\\b';
+ }
+ else if (string == '\t') { expected = '\\t';
+ }
+ else if (string == '\n') { expected = '\\n';
+ }
+ else if (string == '\f') { expected = '\\f';
+ }
Rico 2011/12/08 10:24:37 above: move body down to individual lines + move e
else if (string == '\r') expected = '\\r';
Rico 2011/12/08 10:24:37 also use {} for last else if and move up on previo
} else if (i < 32) {
// Step 2.c
@@ -357,7 +361,7 @@ numFoo.valueOf = "not callable";
numFoo.toString = function() { return "foo"; };
var numTrue = new Number(42);
-numTrue.valueOf = function() { return true; }
+numTrue.valueOf = function() { return true; };
var strFoo = new String("bar");
strFoo.toString = function() { return "foo"; };
@@ -367,7 +371,7 @@ str37.toString = "not callable";
str37.valueOf = function() { return 37; };
var strTrue = new String("bar");
-strTrue.toString = function() { return true; }
+strTrue.toString = function() { return true; };
var func = function() { /* Is callable */ };
@@ -408,7 +412,7 @@ oddball3.__proto__ = { __proto__: null,
toString: "not callable",
valueOf: function() { return true; } };
oddball2.__proto__ = { __proto__: null,
- toJSON: function () { return oddball3; } }
+ toJSON: function () { return oddball3; } };
assertEquals('"true"', JSON.stringify(oddball2));

Powered by Google App Engine
This is Rietveld 408576698