Debian Codegraph @

js/src/tests/test262/language/statements/variable/S12.2_A9.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: When using property attributes, {DontEnum} is not used
6 es5id: 12.2_A9
7 description: >
8 Enumerating property attributes of "this" and then searching for
9 the declared variable
10 ---*/
11
12 var enumed;
13
14 //////////////////////////////////////////////////////////////////////////////
15 //CHECK#1
16 for (var __prop in this){
17 if (__prop === "__declared__var")
18 enumed=true;
19 }
20 if (!(enumed)) {
21 throw new Test262Error('#1: When using property attributes, {DontEnum} not used');
22 }
23 //
24 //////////////////////////////////////////////////////////////////////////////
25
26 var __declared__var;
27
28 reportCompare(0, 0);