js/src/tests/ecma_2/Exceptions/lexical-022.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 // |reftest| skip -- obsolete test
     2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     8 /**
     9    File Name:          lexical-022
    10    Corresponds To      7.4.3-15-n.js
    11    ECMA Section:       7.4.3
    13    Description:
    14    The following words are used as keywords in proposed extensions and are
    15    therefore reserved to allow for the possibility of future adoption of
    16    those extensions.
    18    FutureReservedWord :: one of
    19    case    debugger    export      super
    20    catch   default     extends     switch
    21    class   do          finally     throw
    22    const   enum        import      try
    24    Author:             christine@netscape.com
    25    Date:               12 november 1997
    26 */
    27 var SECTION = "lexical-022.js";
    28 var VERSION = "ECMA_1";
    29 var TITLE   = "Future Reserved Words";
    31 startTest();
    32 writeHeaderToLog( SECTION + " "+ TITLE);
    34 var result = "Failed";
    35 var exception = "No exception thrown";
    36 var expect = "Passed";
    38 try {
    39   eval("import = true;");
    40 } catch ( e ) {
    41   result = expect;
    42   exception = e.toString();
    43 }
    45 new TestCase(
    46   SECTION,
    47   "import = true" +
    48   " (threw " + exception +")",
    49   expect,
    50   result );
    52 test();

mercurial