Home | History | Annotate | Download | only in Exceptions
      1 /**
      2     File Name:          lexical-042.js
      3     Corresponds To:     7.5-9-n.js
      4     ECMA Section:       7.5 Identifiers
      5     Description:        Identifiers are of unlimited length
      6                         - can contain letters, a decimal digit, _, or $
      7                         - the first character cannot be a decimal digit
      8                         - identifiers are case sensitive
      9 
     10     Author:             christine (at) netscape.com
     11     Date:               11 september 1997
     12 */
     13     var SECTION = "lexical-042";
     14     var VERSION = "JS1_4";
     15     var TITLE   = "Identifiers";
     16 
     17     startTest();
     18     writeHeaderToLog( SECTION + " "+ TITLE);
     19 
     20     startTest();
     21     writeHeaderToLog( SECTION + " "+ TITLE);
     22 
     23     var tc = 0;
     24     var testcases = new Array();
     25 
     26     var result = "Failed";
     27     var exception = "No exception thrown";
     28     var expect = "Passed";
     29 
     30     try {
     31         eval("var 123;");
     32     } catch ( e ) {
     33         result = expect;
     34         exception = e.toString();
     35     }
     36 
     37     testcases[tc++] = new TestCase(
     38         SECTION,
     39         "var 123" +
     40         " (threw " + exception +")",
     41         expect,
     42         result );
     43 
     44     test();
     45 
     46 
     47