Debian Codegraph @

js/src/tests/test262/language/asi/S7.9_A3.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: Check Return Statement for automatic semicolon insertion
6 es5id: 7.9_A3
7 description: Try use return \n Expression construction
8 ---*/
9
10 //CHECK#1
11 function f1()
12 {
13 return 1;
14 }
15 if (f1() !== 1) {
16 throw new Test262Error('#1: Check return statement for automatic semicolon insertion');
17 }
18
19 //CHECK#2
20 function f2()
21 {
22 return
23 1;
24 }
25 if (f2() !== undefined) {
26 throw new Test262Error('#2: Check return statement for automatic semicolon insertion');
27 }
28
29 reportCompare(0, 0);