| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
gTestfile = 'keywords-001.js'; |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
var SECTION = ""; |
| 18 |
var VERSION = "ECMA_2"; |
| 19 |
var TITLE = "Keywords"; |
| 20 |
|
| 21 |
startTest(); |
| 22 |
|
| 23 |
print("This test requires option javascript.options.strict enabled"); |
| 24 |
|
| 25 |
if (!options().match(/strict/)) |
| 26 |
{ |
| 27 |
options('strict'); |
| 28 |
} |
| 29 |
if (!options().match(/werror/)) |
| 30 |
{ |
| 31 |
options('werror'); |
| 32 |
} |
| 33 |
|
| 34 |
var result = "failed"; |
| 35 |
|
| 36 |
try { |
| 37 |
eval("super;"); |
| 38 |
} |
| 39 |
catch (x) { |
| 40 |
if (x instanceof SyntaxError) |
| 41 |
result = x.name; |
| 42 |
} |
| 43 |
|
| 44 |
AddTestCase( |
| 45 |
"using the expression \"super\" shouldn't cause js to crash", |
| 46 |
"SyntaxError", |
| 47 |
result ); |
| 48 |
|
| 49 |
test(); |