2006-11-20 W. Andy Carrel <wac@google.com>
[WebKit-https.git] / JavaScriptCore / tests / mozilla / ecma_2 / LexicalConventions / keywords-001.js
1 /**
2  *  File Name:
3  *  ECMA Section:
4  *  Description:
5  *
6  *
7  *  Author:             christine@netscape.com
8  *  Date:               11 August 1998
9  */
10     var SECTION = "";
11     var VERSION = "ECMA_2";
12     var TITLE   = "Keywords";
13
14     startTest();
15
16     var result = "failed";
17
18     try {
19                 eval("super;");
20         } 
21         catch (x) {
22                 if (x instanceof SyntaxError)
23                         result = x.name;
24         }
25
26     AddTestCase(
27         "using the expression \"super\" shouldn't cause js to crash",
28         "SyntaxError",
29         result );
30
31     test();