Bug 907958 - Change a test to not expect exact error messages, only that the errors are SyntaxErrors. r=simple-test-fixup
authorJeff Walden <jwalden@mit.edu>
Mon, 26 Aug 2013 14:05:17 -0700
changeset 144513 2643fd47538b266775a5587cc2e292b18fab88d6
parent 144512 7be13ec6604305852f4a1c62be6b64e98c6511ba
child 144514 43503c7ca48ae62126e63b15553062ab6577a3fd
push id33010
push userjwalden@mit.edu
push dateTue, 27 Aug 2013 21:12:49 +0000
treeherdermozilla-inbound@5991872b4ce3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssimple-test-fixup
bugs907958
milestone26.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 907958 - Change a test to not expect exact error messages, only that the errors are SyntaxErrors. r=simple-test-fixup
js/src/tests/js1_7/geniter/regress-345855.js
js/src/tests/js1_7/lexical/regress-351515.js
--- a/js/src/tests/js1_7/geniter/regress-345855.js
+++ b/js/src/tests/js1_7/geniter/regress-345855.js
@@ -15,37 +15,37 @@ test();
 //-----------------------------------------------------------------------------
 
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
  
-  expect = 'SyntaxError: syntax error';
+  expect = "SyntaxError";
   try
   {
     eval('(function() {x = 12 + yield;})');
     actual = 'No Error';
   }
   catch(ex)
   {
-    actual = ex + '';
+    actual = ex.name;
   }
   reportCompare(expect, actual, summary + ': function() {x = 12 + yield;}');
 
-  expect = 'SyntaxError: syntax error';
+  expect = "SyntaxError";
   try
   {
     eval('(function() {x = 12 + yield 42})');
     actual = 'No Error';
   }
   catch(ex)
   {
-    actual = ex + '';
+    actual = ex.name;
   }
   reportCompare(expect, actual, summary + ': function() {x = 12 + yield 42}');
 
   expect = 'No Error';
   try
   {
     eval('(function() {x = 12 + (yield);})');
     actual = 'No Error';
--- a/js/src/tests/js1_7/lexical/regress-351515.js
+++ b/js/src/tests/js1_7/lexical/regress-351515.js
@@ -11,90 +11,90 @@ var expect = '';
 
 
 //-----------------------------------------------------------------------------
 test();
 //-----------------------------------------------------------------------------
 
 try
 {
-  expect = 'SyntaxError: yield not in function';
+  expect = "SyntaxError";
   eval('yield = 1;');
   actual = 'No Error';
 }
 catch(ex)
 {
-  actual = ex + '';
+  actual = ex.name;
 }
 reportCompare(expect, actual, summary + ': global: yield = 1');
 
 try
 {
-  expect = 'SyntaxError: syntax error';
+  expect = "SyntaxError";
   eval('(function(){yield = 1;})');
   actual = 'No Error';
 }
 catch(ex)
 {
-  actual = ex + '';
+  actual = ex.name;
 }
 reportCompare(expect, actual, summary + ': local: yield = 1');
 
 try
 {
-  expect = 'SyntaxError: missing variable name';
+  expect = "SyntaxError";
   eval('let = 1;');
   actual = 'No Error';
 }
 catch(ex)
 {
-  actual = ex + '';
+  actual = ex.name;
 }
 reportCompare(expect, actual, summary + ': global: let = 1');
 
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
  
   try
   {
-    expect = 'SyntaxError: missing formal parameter';
+    expect = "SyntaxError";
     eval('function f(yield, let) { return yield+let; }');
     actual = 'No Error';
   }
   catch(ex)
   {
-    actual = ex + '';
+    actual = ex.name;
   }
   reportCompare(expect, actual, summary +
 		': function f(yield, let) { return yield+let; }');
 
   try
   {
-    expect = 'SyntaxError: missing variable name';
+    expect = "SyntaxError";
     eval('var yield = 1;');
     actual = 'No Error';
   }
   catch(ex)
   {
-    actual = ex + '';
+    actual = ex.name;
   }
   reportCompare(expect, actual, summary + ': function () {var yield;}');
 
   try
   {
-    expect = 'SyntaxError: missing variable name';
+    expect = "SyntaxError";
     eval('var let = 1;');
     actual = 'No Error';
   }
   catch(ex)
   {
-    actual = ex + '';
+    actual = ex.name;
   }
   reportCompare(expect, actual, summary + ': function () { var let;}');
 
   try
   {
     expect = 'No Error';
     function yield() {}
     actual = 'No Error';