2011-09-07 08:35:18 +02:00
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
2014-07-22 01:09:02 +02:00
/ * - - -
info : Correct interpretation of single line comments
2014-07-25 00:41:42 +02:00
es5id : 7.4 _A1 _T1
2014-07-22 01:09:02 +02:00
description : Create comments with any code
-- - * /
2011-09-07 08:35:18 +02:00
//CHECK#1
2020-09-17 18:23:49 +02:00
// Test262Error.thrower('#1: Correct interpretation single line comments');
2011-09-07 08:35:18 +02:00
//CHECK#2
var x = 0 ;
2020-09-17 18:23:49 +02:00
assert . sameValue ( x , 0 , 'The value of `x` is 0' ) ;
2011-09-07 08:35:18 +02:00
//CHECK#3
var // y = 1;
y ;
2020-09-17 18:23:49 +02:00
assert . sameValue ( y , undefined , 'The value of `y` is expected to equal `undefined`' ) ;
2011-09-07 08:35:18 +02:00
//CHECK#4
2020-09-17 18:23:49 +02:00
//Test262Error.thrower('#4: Correct interpretation single line comments') //Test262Error.thrower('#4: Correct interpretation single line comments'); //
2011-09-07 08:35:18 +02:00
////CHECK#5
//var x = 1;
//if (x === 1) {
2020-09-17 18:23:49 +02:00
// Test262Error.thrower('#5: Correct interpretation single line comments');
2011-09-07 08:35:18 +02:00
//}
//CHECK#6
//var this.y = 1;
this . y ++ ;
2020-09-17 18:23:49 +02:00
assert . sameValue ( isNaN ( y ) , true , 'isNaN(y) returns true' ) ;