diff --git a/js/tests/js1_7/block/regress-347559.js b/js/tests/js1_7/block/regress-347559.js index f08bab135ac..a62bd402ef6 100755 --- a/js/tests/js1_7/block/regress-347559.js +++ b/js/tests/js1_7/block/regress-347559.js @@ -39,8 +39,8 @@ var bug = 347559; var summary = 'Let declarations should not warn that function does not ' + 'return a value'; -var actual = 'No Warning'; -var expect = 'No Warning'; +var actual = ''; +var expect = ''; //----------------------------------------------------------------------------- @@ -55,6 +55,9 @@ function test() var jsOptions = new JavaScriptOptions(); + actual = 'No Warning'; + expect = 'No Warning'; + jsOptions.setOption('strict', true); jsOptions.setOption('werror', true); @@ -69,7 +72,10 @@ function test() jsOptions.reset(); - reportCompare(expect, actual, summary); + reportCompare(expect, actual, summary + ': 1'); + + actual = 'No Warning'; + expect = 'TypeError: function f does not always return a value'; jsOptions.setOption('strict', true); jsOptions.setOption('werror', true); @@ -85,7 +91,10 @@ function test() jsOptions.reset(); - reportCompare(expect, actual, summary); + reportCompare(expect, actual, summary + ': 2'); + + actual = 'No Warning'; + expect = 'No Warning'; jsOptions.setOption('strict', true); jsOptions.setOption('werror', true); @@ -101,7 +110,7 @@ function test() jsOptions.reset(); - reportCompare(expect, actual, summary); + reportCompare(expect, actual, summary + ': 3'); exitFunc ('test'); }