js/src/tests/ecma/LexicalConventions/7.3-1.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 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 /**
     8    File Name:          7.3-1.js
     9    ECMA Section:       7.3 Comments
    10    Description:
    13    Author:             christine@netscape.com
    14    Date:               12 november 1997
    16 */
    17 var SECTION = "7.3-1";
    18 var VERSION = "ECMA_1";
    19 startTest();
    20 var TITLE   = "Comments";
    22 writeHeaderToLog( SECTION + " "+ TITLE);
    24 var testcase;
    26 testcase = new TestCase( SECTION,
    27 			 "a comment with a line terminator string, and text following",
    28 			 "pass",
    29 			 "pass");
    31 // "\u000A" testcase.actual = "fail";
    34 testcase = new TestCase( SECTION,
    35 			 "// test \\n testcase.actual = \"pass\"",
    36 			 "pass",
    37 			 "" );
    39 var x = "// test \n testcase.actual = 'pass'";
    41 testcase.actual = eval(x);
    43 test();
    45 // XXX bc replace test()
    46 function test() {
    47   for ( gTc=0; gTc < gTestcases.length; gTc++ ) {
    48     gTestcases[gTc].passed = writeTestCaseResult(
    49       gTestcases[gTc].expect,
    50       gTestcases[gTc].actual,
    51       gTestcases[gTc].description +":  "+
    52       gTestcases[gTc].actual );
    54     gTestcases[gTc].reason += ( gTestcases[gTc].passed ) ? "" : " ignored chars after line terminator of single-line comment";
    55   }
    56   stopTest();
    57   return ( gTestcases );
    58 }

mercurial