зеркало из https://github.com/mozilla/pjs.git
JavaScript Tests - update tests to reflect changing error messages, bug 404355
This commit is contained in:
Родитель
360615f7e6
Коммит
b3ddf1485e
|
@ -40,7 +40,7 @@ var gTestfile = 'regress-328664.js';
|
|||
var BUGNUMBER = 328664;
|
||||
var summary = 'Correct error message for funccall(undefined, undefined.prop)';
|
||||
var actual = '';
|
||||
var expect = 'TypeError: value.parameters has no properties';
|
||||
var expect = /TypeError: value.parameters (has no properties|is undefined)/;
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
@ -61,4 +61,4 @@ catch(ex)
|
|||
actual = ex + '';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
reportMatch(expect, actual, summary);
|
||||
|
|
|
@ -54,7 +54,7 @@ function test()
|
|||
printStatus (summary);
|
||||
|
||||
print('See Also bug 365891');
|
||||
expect = 'TypeError: a(1) has no properties';
|
||||
expect = /TypeError: a\(1\) (has no properties|is null)/;
|
||||
try
|
||||
{
|
||||
function a(){return null;} a(1)[0];
|
||||
|
@ -63,9 +63,9 @@ function test()
|
|||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
reportCompare(expect, actual, summary);
|
||||
reportMatch(expect, actual, summary);
|
||||
|
||||
expect = 'TypeError: /a/.exec("b") has no properties';
|
||||
expect = /TypeError: \/a\/\.exec\("b"\) (has no properties|is null)/;
|
||||
try
|
||||
{
|
||||
/a/.exec("b")[0];
|
||||
|
@ -74,7 +74,7 @@ function test()
|
|||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
reportCompare(expect, actual, summary);
|
||||
reportMatch(expect, actual, summary);
|
||||
|
||||
exitFunc ('test');
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ function test()
|
|||
}
|
||||
reportCompare(expect, actual, summary + ': 1');
|
||||
|
||||
expect = 'TypeError: x.t has no properties';
|
||||
expect = /TypeError: x.t (has no properties|is undefined)/;
|
||||
actual = 'No Crash';
|
||||
try
|
||||
{
|
||||
|
@ -77,9 +77,9 @@ function test()
|
|||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
reportCompare(expect, actual, summary + ': 2');
|
||||
reportMatch(expect, actual, summary + ': 2');
|
||||
|
||||
expect = 'TypeError: x.t has no properties';
|
||||
expect = /TypeError: x.t (has no properties|is undefined)/;
|
||||
actual = 'No Crash';
|
||||
try
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ function test()
|
|||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
reportCompare(expect, actual, summary + ': 3');
|
||||
reportMatch(expect, actual, summary + ': 3');
|
||||
|
||||
expect = 'TypeError: b is not a constructor';
|
||||
actual = 'No Crash';
|
||||
|
@ -104,7 +104,7 @@ function test()
|
|||
}
|
||||
reportCompare(expect, actual, summary + ': 4');
|
||||
|
||||
expect = 'TypeError: this.zzz has no properties';
|
||||
expect = /TypeError: this.zzz (has no properties|is undefined)/;
|
||||
actual = 'No Crash';
|
||||
try
|
||||
{
|
||||
|
@ -114,7 +114,7 @@ function test()
|
|||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
reportCompare(expect, actual, summary + ': 5');
|
||||
reportMatch(expect, actual, summary + ': 5');
|
||||
|
||||
expect = 'TypeError: p.z = <x><y/></x> ? 3 : 4 is not a function';
|
||||
actual = 'No Crash';
|
||||
|
|
|
@ -53,7 +53,7 @@ function test()
|
|||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
expect = 'TypeError: [1, 2, 3, 4].g has no properties';
|
||||
expect = /TypeError: \[1, 2, 3, 4\].g (has no properties|is undefined)/;
|
||||
actual = '';
|
||||
try
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ function test()
|
|||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
reportCompare(expect, actual, summary);
|
||||
reportMatch(expect, actual, summary);
|
||||
|
||||
exitFunc ('test');
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче