tor-browser

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

S13_A8_T2.js (1373B)


      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 property of activation object contains real params to be passed
      6 es5id: 13_A8_T2
      7 description: >
      8    Creating a function with no parameters and using arguments.length
      9    property in order to perform the test
     10 ---*/
     11 
     12 function __func() {
     13 	return arguments.length;
     14 }
     15 
     16 //////////////////////////////////////////////////////////////////////////////
     17 //CHECK#1
     18 if (__func('A') !== 1) {
     19 	throw new Test262Error('#1: __func(\'A\') === 1. Actual: __func(\'A\') ==='+__func('A'));
     20 }
     21 //
     22 //////////////////////////////////////////////////////////////////////////////
     23 
     24 //////////////////////////////////////////////////////////////////////////////
     25 //CHECK#2
     26 if (__func('A', 'B', 1, 2,__func) !== 5) {
     27 throw new Test262Error('#2: __func(\'A\', \'B\', 1, 2,__func) === 5. Actual: __func(\'A\', \'B\', 1, 2,__func) ==='+__func('A', 'B', 1, 2,__func));
     28 }
     29 //
     30 //////////////////////////////////////////////////////////////////////////////
     31 
     32 //////////////////////////////////////////////////////////////////////////////
     33 //CHECK#3
     34 if (__func() !== 0) {
     35 throw new Test262Error('#3: __func() === 0. Actual: __func() ==='+__func());
     36 }
     37 //
     38 //////////////////////////////////////////////////////////////////////////////
     39 
     40 reportCompare(0, 0);