tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

S11.2.4_A1.1_T2.js (806B)


      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: "Arguments : ()"
      6 es5id: 11.2.4_A1.1_T2
      7 description: Function is declared with FormalParameterList
      8 ---*/
      9 
     10 function f_arg(x,y) {
     11  return arguments;
     12 }
     13 
     14 //CHECK#1
     15 if (f_arg().length !== 0) {
     16  throw new Test262Error('#1: function f_arg(x,y) {return arguments;} f_arg().length === 0. Actual: ' + (f_arg().length));
     17 }
     18 
     19 //CHECK#2
     20 if (f_arg()[0] !== undefined) {
     21  throw new Test262Error('#2: function f_arg(x,y) {return arguments;} f_arg()[0] === undefined. Actual: ' + (f_arg()[0]));
     22 }
     23 
     24 //CHECK#3
     25 if (f_arg.length !== 2) {
     26  throw new Test262Error('#3: function f_arg(x,y) {return arguments;} f_arg.length === 2. Actual: ' + (f_arg.length));
     27 }
     28 
     29 reportCompare(0, 0);