Debian Codegraph @

js/src/tests/test262/language/comments/S7.4_A2_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 multi line comments
6 es5id: 7.4_A2_T1
7 description: Create comments with any code
8 ---*/
9
10 /*CHECK#1*/
11 /* Test262Error.thrower('#1: Correct interpretation multi line comments');
12 */
13
14 /*CHECK#2*/
15 var x = 0;
16 /* x = 1;*/
17 assert.sameValue(x, 0, 'The value of `x` is 0');
18
19 //CHECK#3
20 var /* y = 1;*/
21 y;
22 assert.sameValue(y, undefined, 'The value of `y` is expected to equal `undefined`');
23
24 //CHECK#4
25 var /* y = 1;*/ y;
26 assert.sameValue(y, undefined, 'The value of `y` is expected to equal `undefined`');
27
28 /*CHECK#5*/
29 /*var x = 1;
30 if (x === 1) {
31 Test262Error.thrower('#5: Correct interpretation multi line comments');
32 }
33 */
34
35 /*CHECK#6*/
36 /*var this.y = 1;*/
37 this.y++;
38 assert.sameValue(isNaN(y), true, 'isNaN(y) returns true');
39
40 //CHECK#7
41 var string = "/*var y = 0*/" /* y = 1;*/
42 assert.sameValue(string, "/*var y = 0*/", 'The value of `string` is "/*var y = 0*/"');
43
44 //CHECK#8
45 var string = "/*var y = 0" /* y = 1;*/
46 assert.sameValue(string, "/*var y = 0", 'The value of `string` is "/*var y = 0"');
47
48 /*CHECK#9*/
49 /** Test262Error.thrower('#9: Correct interpretation multi line comments');
50 */
51
52 /*CHECK#10*/
53 /* Test262Error.thrower('#10: Correct interpretation multi line comments');
54 **/
55
56 /*CHECK#11*/
57 /****** Test262Error.thrower('#11: Correct interpretation multi line comments');*********
58 ***********
59 *
60
61
62 **********
63 **/
64
65 reportCompare(0, 0);