зеркало из https://github.com/mozilla/pjs.git
JavaScript Test Library - corrections for regression test for bug 347559
This commit is contained in:
Родитель
4600d4d013
Коммит
a8cf0d11f0
|
@ -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');
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче