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 348883 d9d62360b963bd672bb052586e3e1fcd8cb39864
parent 348882 1a2627378a0dace519c6e8d6c465f76bc4d8d599
child 348884 90582bb8f7ed19b4e9ea9effa4f1f0825228f715
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai
bugs1280362
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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)