Debian Codegraph @

js/src/tests/test262/built-ins/Array/S15.4.2.1_A1.1_T1.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: |
6 The [[Prototype]] property of the newly constructed object
7 is set to the original Array prototype object, the one that
8 is the initial value of Array.prototype
9 es5id: 15.4.2.1_A1.1_T1
10 description: >
11 Create new property of Array.prototype. When new Array object has
12 this property
13 ---*/
14
15 Array.prototype.myproperty = 1;
16 var x = new Array();
17 assert.sameValue(x.myproperty, 1, 'The value of x.myproperty is expected to be 1');
18 assert.sameValue(x.hasOwnProperty('myproperty'), false, 'x.hasOwnProperty("myproperty") must return false');
19
20 reportCompare(0, 0);