blob: 53e7af07f09858d1489d9a1664d7e4421c5f3153 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: Correct interpretation of single line comments
es5id: 7.4_A1_T1
description: Create comments with any code
---*/
//CHECK#1
// Test262Error.thrower('#1: Correct interpretation single line comments');
//CHECK#2
var x = 0;
assert.sameValue(x, 0, 'The value of `x` is 0');
//CHECK#3
var // y = 1;
y;
assert.sameValue(y, undefined, 'The value of `y` is expected to equal `undefined`');
//CHECK#4
//Test262Error.thrower('#4: Correct interpretation single line comments') //Test262Error.thrower('#4: Correct interpretation single line comments'); //
////CHECK#5
//var x = 1;
//if (x === 1) {
// Test262Error.thrower('#5: Correct interpretation single line comments');
//}
//CHECK#6
//var this.y = 1;
this.y++;
assert.sameValue(isNaN(y), true, 'isNaN(y) returns true');
reportCompare(0, 0);
|