michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: /** michael@0: File Name: 7.3-1.js michael@0: ECMA Section: 7.3 Comments michael@0: Description: michael@0: michael@0: michael@0: Author: christine@netscape.com michael@0: Date: 12 november 1997 michael@0: michael@0: */ michael@0: var SECTION = "7.3-1"; michael@0: var VERSION = "ECMA_1"; michael@0: startTest(); michael@0: var TITLE = "Comments"; michael@0: michael@0: writeHeaderToLog( SECTION + " "+ TITLE); michael@0: michael@0: var testcase; michael@0: michael@0: testcase = new TestCase( SECTION, michael@0: "a comment with a line terminator string, and text following", michael@0: "pass", michael@0: "pass"); michael@0: michael@0: // "\u000A" testcase.actual = "fail"; michael@0: michael@0: michael@0: testcase = new TestCase( SECTION, michael@0: "// test \\n testcase.actual = \"pass\"", michael@0: "pass", michael@0: "" ); michael@0: michael@0: var x = "// test \n testcase.actual = 'pass'"; michael@0: michael@0: testcase.actual = eval(x); michael@0: michael@0: test(); michael@0: michael@0: // XXX bc replace test() michael@0: function test() { michael@0: for ( gTc=0; gTc < gTestcases.length; gTc++ ) { michael@0: gTestcases[gTc].passed = writeTestCaseResult( michael@0: gTestcases[gTc].expect, michael@0: gTestcases[gTc].actual, michael@0: gTestcases[gTc].description +": "+ michael@0: gTestcases[gTc].actual ); michael@0: michael@0: gTestcases[gTc].reason += ( gTestcases[gTc].passed ) ? "" : " ignored chars after line terminator of single-line comment"; michael@0: } michael@0: stopTest(); michael@0: return ( gTestcases ); michael@0: }