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: * Do not crash with postincrement custom property michael@0: * michael@0: * @path ch08/8.6/S8.6_A2_T2.js michael@0: * @description Try to implement postincrement for not declared custom property michael@0: */ michael@0: michael@0: var __map={}; michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#1 michael@0: if (!isNaN(__map.foo++)) { michael@0: $ERROR('#1: var __map={}; __map.foo === Not-a-Number. Actual: ' + (__map.foo)); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#2 michael@0: if (!("foo" in __map)) { michael@0: $ERROR('#2: var __map={}; "foo" in __map'); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: