Debian Codegraph @

js/src/tests/test262/language/line-terminators/comment-multi-ls.js

raw
1 // |reftest| error:Test262Error
2 // Copyright 2009 the Sputnik authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 info: Multi line comment can contain LINE SEPARATOR (U+2028)
7 esid: sec-line-terminators
8 es5id: 7.3_A5.3
9 description: Insert LINE SEPARATOR (U+2028) into multi line comment
10 negative:
11 phase: runtime
12 type: Test262Error
13 ---*/
14
15 // Because this test concerns the interpretation of non-executable character
16 // sequences within ECMAScript source code, special care must be taken to
17 // ensure that executable code is evaluated as expected.
18 //
19 // Express the intended behavior by intentionally throwing an error; this
20 // guarantees that test runners will only consider the test "passing" if
21 // executable sequences are correctly interpreted as such.
22
23 var x = 0;
24
25 /*
x = 1;
*/
26
27 if (x === 0) {
28 throw new Test262Error();
29 }