Debian Codegraph @

js/src/tests/test262/language/comments/S7.4_A1_T1.js

raw
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 info: Correct interpretation of single line comments
6 es5id: 7.4_A1_T1
7 description: Create comments with any code
8 ---*/
9
10 //CHECK#1
11 // Test262Error.thrower('#1: Correct interpretation single line comments');
12
13 //CHECK#2
14 var x = 0;
15 assert.sameValue(x, 0, 'The value of `x` is 0');
16
17 //CHECK#3
18 var // y = 1;
19 y;
20 assert.sameValue(y, undefined, 'The value of `y` is expected to equal `undefined`');
21
22 //CHECK#4
23 //Test262Error.thrower('#4: Correct interpretation single line comments') //Test262Error.thrower('#4: Correct interpretation single line comments'); //
24
25 ////CHECK#5
26 //var x = 1;
27 //if (x === 1) {
28 // Test262Error.thrower('#5: Correct interpretation single line comments');
29 //}
30
31 //CHECK#6
32 //var this.y = 1;
33 this.y++;
34 assert.sameValue(isNaN(y), true, 'isNaN(y) returns true');
35
36 reportCompare(0, 0);