Home | History | Annotate | Download | only in LexicalConventions
      1 /**
      2  *  File Name:          LexicalConventions/regexp-literals-001.js
      3  *  ECMA Section:       7.8.5
      4  *  Description:
      5  *
      6  *
      7  *  Author:             christine (at) netscape.com
      8  *  Date:               11 August 1998
      9  */
     10     var SECTION = "LexicalConventions/regexp-literals-001.js";
     11     var VERSION = "ECMA_2";
     12     var TITLE   = "Regular Expression Literals";
     13 
     14     startTest();
     15 
     16     // Regular Expression Literals may not be empty; // should be regarded
     17     // as a comment, not a RegExp literal.
     18 
     19     s = //;
     20 
     21     "passed";
     22 
     23     AddTestCase(
     24         "// should be a comment, not a regular expression literal",
     25         "passed",
     26         String(s));
     27 
     28     AddTestCase(
     29         "// typeof object should be type of object declared on following line",
     30         "passed",
     31         (typeof s) == "string" ? "passed" : "failed" );
     32 
     33     AddTestCase(
     34         "// should not return an object of the type RegExp",
     35         "passed",
     36         (typeof s == "object") ? "failed" : "passed" );
     37 
     38     test();
     39