js/src/tests/test262/ch07/7.4/S7.4_A1_T1.js

branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
equal deleted inserted replaced
-1:000000000000 0:260b3a5ad972
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /**
5 * Correct interpretation of single line comments
6 *
7 * @path ch07/7.4/S7.4_A1_T1.js
8 * @description Create comments with any code
9 */
10
11 //CHECK#1
12 // $ERROR('#1: Correct interpretation single line comments');
13
14 //CHECK#2
15 var x = 0;
16 // x = 1;
17 if (x !== 0) {
18 $ERROR('#2: var x = 0; // x = 1; x === 0. Actual: ' + (x));
19 }
20
21 //CHECK#3
22 var // y = 1;
23 y;
24 if (y !== undefined) {
25 $ERROR('#3: var // y = 1; \\n y; y === undefined. Actual: ' + (y));
26 }
27
28 //CHECK#4
29 //$ERROR('#4: Correct interpretation single line comments') //$ERROR('#4: Correct interpretation single line comments'); //
30
31 ////CHECK#5
32 //var x = 1;
33 //if (x === 1) {
34 // $ERROR('#5: Correct interpretation single line comments');
35 //}
36
37 //CHECK#6
38 //var this.y = 1;
39 this.y++;
40 if (isNaN(y) !== true) {
41 $ERROR('#6: //var this.y = 1; \\n this.y++; y === Not-a-Number. Actual: ' + (y));
42 }
43
44

mercurial