Bug 1280362 - Remove the unnecessary VERBOSE variable from shell.js. r=arai
authorJeff Walden <jwalden@mit.edu>
Mon, 25 Apr 2016 15:09:40 -0700
changeset 331847 d9d62360b963bd672bb052586e3e1fcd8cb39864
parent 331846 1a2627378a0dace519c6e8d6c465f76bc4d8d599
child 331848 90582bb8f7ed19b4e9ea9effa4f1f0825228f715
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai
bugs1280362
milestone50.0a1
Bug 1280362 - Remove the unnecessary VERBOSE variable from shell.js. r=arai
js/src/tests/shell.js
--- a/js/src/tests/shell.js
+++ b/js/src/tests/shell.js
@@ -237,17 +237,16 @@
     var cx = GetContext();
     cx.setOptimizationLevel(i);
   }
   global.OptLevel = OptLevel;
 })(this);
 
 
 var STATUS = "STATUS: ";
-var VERBOSE = false;
 var SECT_PREFIX = 'Section ';
 var SECT_SUFFIX = ' of test - ';
 
 var gDelayTestDriverEnd = false;
 
 var gTestcases = new Array();
 var gTc = gTestcases.length;
 var summary = '';
@@ -445,45 +444,27 @@ function escapeString (str)
  * failure report.
  */
 function reportCompare (expected, actual, description) {
   var expected_t = typeof expected;
   var actual_t = typeof actual;
   var output = "";
 
   if (typeof description == "undefined")
-  {
     description = '';
-  }
-  else if (VERBOSE)
-  {
-    printStatus ("Comparing '" + description + "'");
-  }
 
-  if (expected_t != actual_t)
-  {
+  if (expected_t != actual_t) {
     output += "Type mismatch, expected type " + expected_t +
       ", actual type " + actual_t + " ";
   }
-  else if (VERBOSE)
-  {
-    printStatus ("Expected type '" + expected_t + "' matched actual " +
-                 "type '" + actual_t + "'");
-  }
 
-  if (expected != actual)
-  {
+  if (expected != actual) {
     output += "Expected value '" + toPrinted(expected) +
       "', Actual value '" + toPrinted(actual) + "' ";
   }
-  else if (VERBOSE)
-  {
-    printStatus ("Expected value '" + toPrinted(expected) +
-                 "' matched actual value '" + toPrinted(actual) + "'");
-  }
 
   var testcase = new TestCase("unknown-test-name", description, expected, actual);
   testcase.reason = output;
 
   // if running under reftest, let it handle result reporting.
   if (typeof document != "object" ||
       !document.location.href.match(/jsreftest.html/)) {
     if (testcase.passed)
@@ -505,46 +486,28 @@ function reportCompare (expected, actual
  * failure report.
  */
 function reportMatch (expectedRegExp, actual, description) {
   var expected_t = "string";
   var actual_t = typeof actual;
   var output = "";
 
   if (typeof description == "undefined")
-  {
     description = '';
-  }
-  else if (VERBOSE)
-  {
-    printStatus ("Comparing '" + description + "'");
-  }
 
-  if (expected_t != actual_t)
-  {
+  if (expected_t != actual_t) {
     output += "Type mismatch, expected type " + expected_t +
       ", actual type " + actual_t + " ";
   }
-  else if (VERBOSE)
-  {
-    printStatus ("Expected type '" + expected_t + "' matched actual " +
-                 "type '" + actual_t + "'");
-  }
 
   var matches = expectedRegExp.test(actual);
-  if (!matches)
-  {
+  if (!matches) {
     output += "Expected match to '" + toPrinted(expectedRegExp) +
       "', Actual value '" + toPrinted(actual) + "' ";
   }
-  else if (VERBOSE)
-  {
-    printStatus ("Expected match to '" + toPrinted(expectedRegExp) +
-                 "' matched actual value '" + toPrinted(actual) + "'");
-  }
 
   var testcase = new TestCase("unknown-test-name", description, true, matches);
   testcase.reason = output;
 
   // if running under reftest, let it handle result reporting.
   if (typeof document != "object" ||
       !document.location.href.match(/jsreftest.html/)) {
     if (testcase.passed)