Debian Codegraph @

js/src/tests/test262/language/statements/function/S13_A11_T4.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 Since arguments property has attribute { DontDelete }, only its elements
7 can be deleted
8 es5id: 13_A11_T4
9 description: Deleting arguments[i] and checking the type of arguments[i]
10 ---*/
11
12 function __func(){
13 var is_undef=true;
14 for (var i=0; i < arguments.length; i++)
15 {
16 delete arguments[i];
17 is_undef= is_undef && (typeof arguments[i] === "undefined");
18 };
19 return is_undef;
20 };
21
22 //////////////////////////////////////////////////////////////////////////////
23 //CHECK#1
24 if (!__func("A","B",1,2)) {
25 throw new Test262Error('#1: Since arguments property has attribute { DontDelete }, but elements of arguments can be deleted');
26 }
27 //
28 //////////////////////////////////////////////////////////////////////////////
29
30 reportCompare(0, 0);