michael@0: /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: var summary = 'for-each-in should not affect for-in'; michael@0: var BUGNUMBER = 292020; michael@0: var actual = ''; michael@0: var expect = ''; michael@0: michael@0: printBugNumber(BUGNUMBER); michael@0: michael@0: // test here michael@0: function foreachbug() michael@0: { michael@0: var arryOuter = ["outervalue0", "outervalue1"]; michael@0: var arryInner = ["innervalue1","innervalue2"]; michael@0: michael@0: for (var j in arryOuter) michael@0: { michael@0: var result = (j in arryOuter); michael@0: if (!result) michael@0: { michael@0: return ("enumerated property not in object: (" + michael@0: j + " in arryOuter) " + result); michael@0: return result; michael@0: } michael@0: michael@0: michael@0: for each (k in arryInner) michael@0: { michael@0: // this for-each-in should not affect the outer for-in michael@0: } michael@0: } michael@0: return ''; michael@0: } michael@0: michael@0: reportCompare('', foreachbug());