Debian Codegraph @

rhino/testsrc/tests/ecma/LexicalConventions/7.3-1.js

raw symbols SCIP
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/. */
5
6 gTestfile = '7.3-1.js';
7
8 /**
9 File Name: 7.3-1.js
10 ECMA Section: 7.3 Comments
11 Description:
12
13
14 Author: [email protected]
15 Date: 12 november 1997
16
17 */
18 var SECTION = "7.3-1";
19 var VERSION = "ECMA_1";
20 startTest();
21 var TITLE = "Comments";
22
23 writeHeaderToLog( SECTION + " "+ TITLE);
24
25 var testcase;
26
27 testcase = new TestCase( SECTION,
28 "a comment with a line terminator string, and text following",
29 "pass",
30 "pass");
31
32 // "\u000A" testcase.actual = "fail";
33
34
35 testcase = new TestCase( SECTION,
36 "// test \\n testcase.actual = \"pass\"",
37 "pass",
38 "" );
39
40 var x = "// test \n testcase.actual = 'pass'";
41
42 testcase.actual = eval(x);
43
44 test();
45
46 // XXX bc replace test()
47 function test() {
48 for ( gTc=0; gTc < gTestcases.length; gTc++ ) {
49 gTestcases[gTc].passed = writeTestCaseResult(
50 gTestcases[gTc].expect,
51 gTestcases[gTc].actual,
52 gTestcases[gTc].description +": "+
53 gTestcases[gTc].actual );
54
55 gTestcases[gTc].reason += ( gTestcases[gTc].passed ) ? "" : " ignored chars after line terminator of single-line comment";
56 }
57 stopTest();
58 return ( gTestcases );
59 }