tor-browser

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

S15.3.2.1_A2_T1.js (731B)


      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    It is permissible but not necessary to have one argument for each formal
      7    parameter to be specified
      8 es5id: 15.3.2.1_A2_T1
      9 description: >
     10    Values of the function constructor arguments are "arg1", "arg2",
     11    "arg3", "return arg1+arg2+arg3;"
     12 ---*/
     13 
     14 try {
     15  var f = Function("arg1", "arg2", "arg3", "return arg1+arg2+arg3;");
     16 } catch (e) {
     17  throw new Test262Error('#1: test failed');
     18 }
     19 
     20 assert(f instanceof Function, 'The result of evaluating (f instanceof Function) is expected to be true');
     21 assert.sameValue(f(1, 2, 3), 6, 'f(1, 2, 3) must return 6');
     22 
     23 reportCompare(0, 0);