Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/annexB/language/comments/single-line-html-close.js

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