js/src/tests/test262/ch13/13.0/S13_A11_T4.js

branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
equal deleted inserted replaced
-1:000000000000 0:fb4846915fa4
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 * Since arguments property has attribute { DontDelete }, only its elements can be deleted
6 *
7 * @path ch13/13.0/S13_A11_T4.js
8 * @description Deleting arguments[i] and checking the type of arguments[i]
9 */
10
11 function __func(){
12 is_undef=true;
13 for (i=0; i < arguments.length; i++)
14 {
15 delete arguments[i];
16 is_undef= is_undef && (typeof arguments[i] === "undefined");
17 };
18 return is_undef;
19 };
20
21 //////////////////////////////////////////////////////////////////////////////
22 //CHECK#1
23 if (!__func("A","B",1,2)) {
24 $ERROR('#1: Since arguments property has attribute { DontDelete }, but elements of arguments can be deleted');
25 }
26 //
27 //////////////////////////////////////////////////////////////////////////////
28

mercurial