Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | // Copyright 2009 the Sputnik authors. All rights reserved. |
michael@0 | 2 | // This code is governed by the BSD license found in the LICENSE file. |
michael@0 | 3 | |
michael@0 | 4 | /** |
michael@0 | 5 | * When the [[Construct]] property for a Function object F is called: |
michael@0 | 6 | * A new native ECMAScript object is created. |
michael@0 | 7 | * Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument |
michael@0 | 8 | * list passed into [[Construct]] as the argument values. |
michael@0 | 9 | * If Type( [[Call]] returned) is not Object then return passed as this into [[Call]] object |
michael@0 | 10 | * |
michael@0 | 11 | * @path ch13/13.2/S13.2.2_A6_T1.js |
michael@0 | 12 | * @description Declaring a function with "__func = function(arg)" |
michael@0 | 13 | */ |
michael@0 | 14 | |
michael@0 | 15 | __FOO="fooValue"; |
michael@0 | 16 | __BAR="barValue"; |
michael@0 | 17 | |
michael@0 | 18 | __func = function(arg){ |
michael@0 | 19 | this.foo=arg; |
michael@0 | 20 | return 0; |
michael@0 | 21 | this.bar=arguments[1]; |
michael@0 | 22 | }; |
michael@0 | 23 | |
michael@0 | 24 | __obj = new __func(__FOO, __BAR); |
michael@0 | 25 | |
michael@0 | 26 | ////////////////////////////////////////////////////////////////////////////// |
michael@0 | 27 | //CHECK#1 |
michael@0 | 28 | if (__obj.foo!==__FOO) { |
michael@0 | 29 | $ERROR('#1: __obj.foo === __FOO. Actual: __obj.foo==='+__obj.foo); |
michael@0 | 30 | } |
michael@0 | 31 | // |
michael@0 | 32 | ////////////////////////////////////////////////////////////////////////////// |
michael@0 | 33 | |
michael@0 | 34 | ////////////////////////////////////////////////////////////////////////////// |
michael@0 | 35 | //CHECK#2 |
michael@0 | 36 | if (__obj.bar!==undefined) { |
michael@0 | 37 | $ERROR('#2: __obj.bar === undefined. Actual: __obj.bar==='+__obj.bar); |
michael@0 | 38 | } |
michael@0 | 39 | // |
michael@0 | 40 | ////////////////////////////////////////////////////////////////////////////// |
michael@0 | 41 |