mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
JavaScript Test - add additional tests for Function constructor, bug 408271, not part of the build
This commit is contained in:
parent
8a06010627
commit
17360fb8d6
@ -57,7 +57,7 @@ catch(ex)
|
||||
actual = ex + '';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
reportCompare(expect, actual, summary + ': 1');
|
||||
|
||||
try
|
||||
{
|
||||
@ -68,4 +68,29 @@ catch(ex)
|
||||
actual = ex + '';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
reportCompare(expect, actual, summary + ': 2');
|
||||
|
||||
var f;
|
||||
expect = 'TypeError: function anonymous does not always return a value';
|
||||
|
||||
try
|
||||
{
|
||||
f = Function('if (x) return y;');
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary + ': 3');
|
||||
|
||||
try
|
||||
{
|
||||
f = Function('if (x) { return y; }');
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary + ': 4');
|
||||
|
Loading…
Reference in New Issue
Block a user