Debian Codegraph @

js/src/tests/test262/language/statements/variable/S12.2_A12.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: VariableDeclaration within "do-while" loop is allowed
6 es5id: 12.2_A12
7 description: Declaring variable within "do-while" statement
8 ---*/
9
10 //////////////////////////////////////////////////////////////////////////////
11 //CHECK#1
12 try {
13 x=x;
14 } catch (e) {
15 throw new Test262Error('#1: Declaration variable inside "do-while" statement is admitted');
16 }
17 //
18 //////////////////////////////////////////////////////////////////////////////
19
20 do var x; while (false);
21
22 reportCompare(0, 0);