js/src/tests/test262/ch10/10.6/S10.6_A5_T4.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 // Copyright 2009 the Sputnik authors.  All rights reserved.
     2 // This code is governed by the BSD license found in the LICENSE file.
     4 /**
     5  * A property is created with name length with property
     6  * attributes { DontEnum } and no others
     7  *
     8  * @path ch10/10.6/S10.6_A5_T4.js
     9  * @description Overriding arguments.length property
    10  */
    12 var str = "something different";
    13 //CHECK#1
    14 function f1(){
    15   arguments.length = str;
    16   return arguments;
    17 }
    19 try{
    20   if(f1().length !== str){
    21     $ERROR("#1: A property length have attribute { ReadOnly }");
    22   }
    23 }
    24 catch(e){
    25   $ERROR("#1: arguments object don't exists");
    26 }
    28 //CHECK#2
    29 var f2 = function(){
    30     arguments.length = str;
    31     return arguments;
    32   };
    33 try{
    34   if(f2().length !== str){
    35     $ERROR("#2: A property length have attribute { ReadOnly }");
    36   }
    37 }
    38 catch(e){
    39   $ERROR("#2: arguments object don't exists");
    40 }

mercurial