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: * "for(key in null)" Expression is allowed michael@0: * michael@0: * @path ch12/12.6/12.6.4/S12.6.4_A2.js michael@0: * @description Checking if execution of "for(key in null)" passes michael@0: */ michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK# michael@0: try { michael@0: for(__key in null){ michael@0: var key=__key; michael@0: }; michael@0: } catch (e) { michael@0: $ERROR('#1: "for(__key in null){}" does not lead to throwing exception'); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#2 michael@0: if (key!==undefined) { michael@0: $ERROR('#2: key === undefined. Actual: key ==='+key); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: michael@0: michael@0: