single-line-html-close.js (1525B)
1 // |reftest| error:Test262Error 2 // Copyright (C) 2016 the V8 project authors. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 /*--- 5 esid: sec-html-like-comments 6 description: SingleLineHTMLCloseComment 7 info: | 8 Comment :: 9 MultiLineComment 10 SingleLineComment 11 SingleLineHTMLOpenComment 12 SingleLineHTMLCloseComment 13 SingleLineDelimitedComment 14 15 SingleLineHTMLCloseComment :: 16 LineTerminatorSequence HTMLCloseComment 17 18 HTMLCloseComment :: 19 WhiteSpaceSequence[opt] SingleLineDelimitedCommentSequence[opt] --> SingleLineCommentChars[opt] 20 negative: 21 phase: runtime 22 type: Test262Error 23 ---*/ 24 25 var counter = 0; 26 --> 27 counter += 1; 28 29 -->the comment extends to these characters 30 counter += 1; 31 32 -->the comment extends to these characters 33 counter += 1; 34 35 /* optional SingleLineDelimitedCommentSequence */-->the comment extends to these characters 36 counter += 1; 37 38 /**/ /* second optional SingleLineDelimitedCommentSequence */-->the comment extends to these characters 39 counter += 1; 40 41 // Because this test concerns the interpretation of non-executable character 42 // sequences within ECMAScript source code, special care must be taken to 43 // ensure that executable code is evaluated as expected. 44 // 45 // Express the intended behavior by intentionally throwing an error; this 46 // guarantees that test runners will only consider the test "passing" if 47 // executable sequences are correctly interpreted as such. 48 if (counter === 5) { 49 throw new Test262Error(); 50 }