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: * Labelled statements are only used in conjunction with labelled michael@0: * break and continue statements michael@0: * michael@0: * @path ch12/12.12/S12.12_A1_T1.js michael@0: * @description Checking if labelled break works. See continue and break sections michael@0: */ michael@0: michael@0: var object = {p1: 1, p2: 1}; michael@0: var result = 0; michael@0: lbl: for(var i in object){ michael@0: result += object[i]; michael@0: break lbl; michael@0: } michael@0: michael@0: if(!(result === 1)){ michael@0: $ERROR("'break label' should break execution of labelled iteration statement"); michael@0: } michael@0: