From a8cf0d11f0dbfe826f19ad0a4e3a47386c89c5e0 Mon Sep 17 00:00:00 2001 From: "bclary%bclary.com" Date: Tue, 8 Aug 2006 20:25:00 +0000 Subject: [PATCH] JavaScript Test Library - corrections for regression test for bug 347559 --- js/tests/js1_7/block/regress-347559.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) 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'); }