test: add spaces after keywords
authorBrendan Ashworth <brendan.ashworth@me.com>
Tue, 18 Aug 2015 23:32:07 +0000 (16:32 -0700)
committerBrendan Ashworth <brendan.ashworth@me.com>
Sun, 23 Aug 2015 01:01:53 +0000 (18:01 -0700)
eg changes:

  if(x) { ... }

to:

  if (x) { ... }

test/gc/test-http-client-timeout.js
test/internet/test-dgram-broadcast-multi-process.js
test/internet/test-dns.js
test/parallel/test-net-listen-fd0.js
test/parallel/test-stream2-base64-single-char-read-end.js
test/parallel/test-util-inspect.js

index 5bb2d2b..c84581b 100644 (file)
@@ -54,7 +54,7 @@ function getall() {
   setImmediate(getall);
 }
 
-for(var i = 0; i < 10; i++)
+for (var i = 0; i < 10; i++)
   getall();
 
 function afterGC() {
index 4cf5d72..c1ca04a 100644 (file)
@@ -18,7 +18,7 @@ var common = require('../common'),
 // take the first non-internal interface as the address for binding
 get_bindAddress: for (var name in networkInterfaces) {
   var interfaces = networkInterfaces[name];
-  for(var i = 0; i < interfaces.length; i++) {
+  for (var i = 0; i < interfaces.length; i++) {
     var localInterface = interfaces[i];
     if (!localInterface.internal && localInterface.family === 'IPv4') {
       var bindAddress = localInterface.address;
index eb7bab8..796fd26 100644 (file)
@@ -663,7 +663,7 @@ TEST(function test_resolve_failure(done) {
   var req = dns.resolve4('nosuchhostimsure', function(err) {
     assert(err instanceof Error);
 
-    switch(err.code) {
+    switch (err.code) {
       case 'ENOTFOUND':
       case 'ESERVFAIL':
         break;
index bf43726..e326ac2 100644 (file)
@@ -11,7 +11,7 @@ process.on('exit', function() {
 
 // this should fail with an async EINVAL error, not throw an exception
 net.createServer(assert.fail).listen({fd:0}).on('error', function(e) {
-  switch(e.code) {
+  switch (e.code) {
     case 'EINVAL':
     case 'ENOTSOCK':
       gotError = e;
index 37a97cd..e50ea5a 100644 (file)
@@ -11,7 +11,7 @@ var accum = [];
 var timeout;
 
 src._read = function(n) {
-  if(!hasRead) {
+  if (!hasRead) {
     hasRead = true;
     process.nextTick(function() {
       src.push(new Buffer('1'));
index fcde1c7..58a4c8a 100644 (file)
@@ -106,7 +106,7 @@ assert.ok(util.inspect(y), '[ \'a\', \'b\', \'c\', \'\\\\\\\': \'d\' ]');
 function test_color_style(style, input, implicit) {
   var color_name = util.inspect.styles[style];
   var color = ['', ''];
-  if(util.inspect.colors[color_name])
+  if (util.inspect.colors[color_name])
     color = util.inspect.colors[color_name];
 
   var without_color = util.inspect(input, false, 0, false);