summaryrefslogtreecommitdiff
path: root/test/built-ins/Object/prototype/S15.2.3.1_A2.js
blob: 996c86525be102e18cf533b0e604cfce8e77ae5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: The Object.prototype property has the attribute DontEnum
es5id: 15.2.3.1_A2
description: Checking if enumerating "Object.prototype" property fails
---*/

// CHECK#1
if (Object.propertyIsEnumerable('prototype')) {
  $ERROR('#1: the Object.prototype property has the attributes DontEnum');
}

// CHECK#2
var cout=0;

for (var p in Object){
  if (p==="prototype") cout++;
}

if (cout !== 0) {
  $ERROR('#2: the Object.prototype property has the attributes DontEnum');
}