Debian Codegraph @

js/src/tests/test262/built-ins/JSON/15.12-0-4.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: |
6 This test should be run without any built-ins being added/augmented.
7 The last paragraph in section 15 says "every other property described
8 in this section has the attribute {... [[Enumerable]] : false ...}
9 unless otherwise specified. This default applies to the properties on
10 JSON, and we should not be able to enumerate them.
11 es5id: 15.12-0-4
12 description: JSON object's properties must be non enumerable
13 ---*/
14
15 var o = JSON;
16 var i = 0;
17 for (var p in o) {
18 i++;
19 }
20
21
22 assert.sameValue(i, 0, 'i');
23
24 reportCompare(0, 0);