Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
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 */
11 //CHECK#1
12 // $ERROR('#1: Correct interpretation single line comments');
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 }
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 }
28 //CHECK#4
29 //$ERROR('#4: Correct interpretation single line comments') //$ERROR('#4: Correct interpretation single line comments'); //
31 ////CHECK#5
32 //var x = 1;
33 //if (x === 1) {
34 // $ERROR('#5: Correct interpretation single line comments');
35 //}
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 }