| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
gTestfile = '7.3-1.js'; |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 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 |
|
| 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 |
|
| 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 |
} |