michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * [[Call]] executes code associated with the object michael@0: * michael@0: * @path ch08/8.6/8.6.2/S8.6.2_A5_T2.js michael@0: * @description Call function-property of object, property defined michael@0: * as seat['move']=function(){position++} michael@0: */ michael@0: michael@0: this.position=0; michael@0: var seat = {}; michael@0: seat['move']=function(){position++}; michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#1 michael@0: seat.move(); michael@0: if (position !==1) { michael@0: $ERROR('#1: this.position=0; seat = {}; seat[\'move\']=function(){position++}; seat.move(); position === 1. Actual: ' + (position)); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#2 michael@0: seat['move'](); michael@0: if (position !==2) { michael@0: $ERROR('#2: this.position=0; seat = {}; seat[\'move\']=function(){position++}; seat.move(); seat[\'move\'](); position === 2. Actual: ' + (position)); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: