[gjs] tests: Some minor style beautifications



commit 3748196fed6ab338ebd4bb386fe8e87eb1bfab54
Author: Sam Spilsbury <smspillaz gmail com>
Date:   Thu Jan 15 10:36:00 2015 +0800

    tests: Some minor style beautifications
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742535

 installed-tests/js/testCoverage.js |   62 ++++++++++++++++++------------------
 1 files changed, 31 insertions(+), 31 deletions(-)
---
diff --git a/installed-tests/js/testCoverage.js b/installed-tests/js/testCoverage.js
index f22c3e9..5446a9e 100644
--- a/installed-tests/js/testCoverage.js
+++ b/installed-tests/js/testCoverage.js
@@ -63,7 +63,7 @@ function testExpressionLinesFoundForLinesInsideAnonymousFunctions() {
 function testExpressionLinesFoundForBodyOfFunctionProperty() {
     let foundLinesInsideFunctionProperty =
         parseScriptForExpressionLines("var o = {\n" +
-                                      "    foo: function () {\n" +
+                                      "    foo: function() {\n" +
                                       "        let x = a;\n" +
                                       "    }\n" +
                                       "};\n");
@@ -186,7 +186,7 @@ function testExpressionLinesFoundForAllLinesOfMultilineIfTests() {
     let foundLinesInsideMultilineIfTest =
         parseScriptForExpressionLines("if (1 > 0 &&\n" +
                                       "    2 > 0 &&\n" +
-                                      "    3 > 0){\n" +
+                                      "    3 > 0) {\n" +
                                       "    let a = 3;\n" +
                                       "}\n");
     assertArrayEquals(foundLinesInsideMultilineIfTest,
@@ -317,8 +317,8 @@ function testFunctionsFoundOnSameLineButDifferentiatedOnArgs() {
      * one line */
     let foundFunctionsOnSameLine =
         parseScriptForFunctionNames("function f1() {" +
-                                    "    return (function (a) {" +
-                                    "        return function (a, b) {}" +
+                                    "    return (function(a) {" +
+                                    "        return function(a, b) {}" +
                                     "    });" +
                                     "}");
     assertArrayEquals(foundFunctionsOnSameLine,
@@ -343,7 +343,7 @@ function testFunctionsInsideArrayExpression() {
 
 function testFunctionsInsideArrowExpression() {
     let foundFunctions =
-        parseScriptForFunctionNames("(a) => (function(){})();\n");
+        parseScriptForFunctionNames("(a) => (function() {})();\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -354,8 +354,8 @@ function testFunctionsInsideArrowExpression() {
 
 function testFunctionsInsideSequence() {
     let foundFunctions =
-        parseScriptForFunctionNames("(function(a){})()," +
-                                    "(function(a, b){})();\n");
+        parseScriptForFunctionNames("(function(a) {})()," +
+                                    "(function(a, b) {})();\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -367,7 +367,7 @@ function testFunctionsInsideSequence() {
 
 function testFunctionsInsideUnaryExpression() {
     let foundFunctions =
-        parseScriptForFunctionNames("let a = (function () {}())++;\n");
+        parseScriptForFunctionNames("let a = (function() {}())++;\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -378,8 +378,8 @@ function testFunctionsInsideUnaryExpression() {
 
 function testFunctionsInsideBinaryExpression() {
     let foundFunctions =
-        parseScriptForFunctionNames("let a = function (a) {}() +" +
-                                    " function (a, b) {}();\n");
+        parseScriptForFunctionNames("let a = function(a) {}() +" +
+                                    " function(a, b) {}();\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -391,7 +391,7 @@ function testFunctionsInsideBinaryExpression() {
 
 function testFunctionsInsideAssignmentExpression() {
     let foundFunctions =
-        parseScriptForFunctionNames("let a = function () {}();\n");
+        parseScriptForFunctionNames("let a = function() {}();\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -403,7 +403,7 @@ function testFunctionsInsideAssignmentExpression() {
 function testFunctionsInsideUpdateExpression() {
     let foundFunctions =
         parseScriptForFunctionNames("let a;\n" +
-                                    "a += function () {}();\n");
+                                    "a += function() {}();\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -414,8 +414,8 @@ function testFunctionsInsideUpdateExpression() {
 
 function testFunctionsInsideIfConditions() {
     let foundFunctions =
-        parseScriptForFunctionNames("if (function (a) {}(a) >" +
-                                    "    function (a, b) {}(a, b)) {};\n");
+        parseScriptForFunctionNames("if (function(a) {}(a) >" +
+                                    "    function(a, b) {}(a, b)) {}\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -427,8 +427,8 @@ function testFunctionsInsideIfConditions() {
 
 function testFunctionsInsideWhileConditions() {
     let foundFunctions =
-        parseScriptForFunctionNames("while (function (a) {}(a) >" +
-                                    "       function (a, b) {}(a, b)) {};\n");
+        parseScriptForFunctionNames("while (function(a) {}(a) >" +
+                                    "       function(a, b) {}(a, b)) {};\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -440,7 +440,7 @@ function testFunctionsInsideWhileConditions() {
 
 function testFunctionsInsideForInitializer() {
     let foundFunctions =
-        parseScriptForFunctionNames("for (function() {};;) {}\n");
+        parseScriptForFunctionNames("for (function() {}; ;) {}\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -454,7 +454,7 @@ function testFunctionsInsideForInitializer() {
  * LetStatement initializer case too */
 function testFunctionsInsideForLetInitializer() {
     let foundFunctions =
-        parseScriptForFunctionNames("for (let i = function() {};;) {}\n");
+        parseScriptForFunctionNames("for (let i = function() {}; ;) {}\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -465,7 +465,7 @@ function testFunctionsInsideForLetInitializer() {
 
 function testFunctionsInsideForVarInitializer() {
     let foundFunctions =
-        parseScriptForFunctionNames("for (var i = function() {};;) {}\n");
+        parseScriptForFunctionNames("for (var i = function() {}; ;) {}\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -487,7 +487,7 @@ function testFunctionsInsideForCondition() {
 
 function testFunctionsInsideForIncrement() {
     let foundFunctions =
-        parseScriptForFunctionNames("for (;;function() {}()) {}\n");
+        parseScriptForFunctionNames("for (; ;function() {}()) {}\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -520,7 +520,7 @@ function testFunctionsInsideForInObject() {
 
 function testFunctionsInsideForOfObject() {
     let foundFunctions =
-        parseScriptForFunctionNames("for (x of (function(){}())) {}\n");
+        parseScriptForFunctionNames("for (x of (function() {}())) {}\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -531,7 +531,7 @@ function testFunctionsInsideForOfObject() {
 
 function testFunctionsUsedAsObjectFound() {
     let foundFunctions =
-        parseScriptForFunctionNames("f = function() { }.bind();\n");
+        parseScriptForFunctionNames("f = function() {}.bind();\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -542,7 +542,7 @@ function testFunctionsUsedAsObjectFound() {
 
 function testFunctionsUsedAsObjectDynamicProp() {
     let foundFunctions =
-        parseScriptForFunctionNames("f = function() { }['bind']();\n");
+        parseScriptForFunctionNames("f = function() {}['bind']();\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -553,8 +553,8 @@ function testFunctionsUsedAsObjectDynamicProp() {
 
 function testFunctionsOnEitherSideOfLogicalExpression() {
     let foundFunctions =
-        parseScriptForFunctionNames("let f = function(a) { } ||" +
-                                    " function(a, b) { };\n");
+        parseScriptForFunctionNames("let f = function(a) {} ||" +
+                                    " function(a, b) {};\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -567,8 +567,8 @@ function testFunctionsOnEitherSideOfLogicalExpression() {
 function testFunctionsOnEitherSideOfConditionalExpression() {
     let foundFunctions =
         parseScriptForFunctionNames("let a\n" +
-                                    "let f = a ? function(a) { }() :" +
-                                    " function(a, b) { }();\n");
+                                    "let f = a ? function(a) {}() :" +
+                                    " function(a, b) {}();\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -580,7 +580,7 @@ function testFunctionsOnEitherSideOfConditionalExpression() {
 
 function testFunctionsYielded() {
     let foundFunctions =
-        parseScriptForFunctionNames("function a () { yield function (){} };\n");
+        parseScriptForFunctionNames("function a() { yield function (){} };\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -593,7 +593,7 @@ function testFunctionsYielded() {
 function testFunctionsInArrayComprehensionBody() {
     let foundFunctions =
         parseScriptForFunctionNames("let a = new Array(1);\n" +
-                                    "let b = [function () {} for (i of a)];\n");
+                                    "let b = [function() {} for (i of a)];\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -605,7 +605,7 @@ function testFunctionsInArrayComprehensionBody() {
 function testFunctionsInArrayComprehensionBlock() {
     let foundFunctions =
         parseScriptForFunctionNames("let a = new Array(1);\n" +
-                                    "let b = [i for (i of function () {})];\n");
+                                    "let b = [i for (i of function() {})];\n");
 
     assertArrayEquals(foundFunctions,
                       [
@@ -618,7 +618,7 @@ function testFunctionsInArrayComprehensionFilter() {
     let foundFunctions =
         parseScriptForFunctionNames("let a = new Array(1);\n" +
                                     "let b = [i for (i of a)" +
-                                    "if (function () {} ())];\n");
+                                    "if (function() {}())];\n");
 
     assertArrayEquals(foundFunctions,
                       [


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]