Debian Codegraph @

js/src/tests/test262/language/statements/function/S13_A11_T2.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_T2
9 description: >
10 Checking if deleting the arguments property fails and then
11 returning it
12 flags: [noStrict]
13 ---*/
14
15 function __func(){
16 delete arguments;
17 return arguments;
18 }
19
20 //////////////////////////////////////////////////////////////////////////////
21 //CHECK#1
22 if (typeof __func("A","B",1,2) !== "object") {
23 throw new Test262Error('#1: arguments property has attribute { DontDelete }');
24 }
25 //
26 //////////////////////////////////////////////////////////////////////////////
27
28 reportCompare(0, 0);