1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/test262/ch12/12.11/S12.11_A2_T1.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,30 @@ 1.4 +// Copyright 2009 the Sputnik authors. All rights reserved. 1.5 +// This code is governed by the BSD license found in the LICENSE file. 1.6 + 1.7 +/** 1.8 + * There can be only one DefaultClause 1.9 + * 1.10 + * @path ch12/12.11/S12.11_A2_T1.js 1.11 + * @description Duplicate DefaultClause 1.12 + * @negative 1.13 + */ 1.14 + 1.15 +function SwitchTest(value){ 1.16 + var result = 0; 1.17 + 1.18 + switch(value) { 1.19 + case 0: 1.20 + result += 2; 1.21 + default: 1.22 + result += 32; 1.23 + break; 1.24 + default: 1.25 + result += 32; 1.26 + break; 1.27 + } 1.28 + 1.29 + return result; 1.30 +} 1.31 + 1.32 +var x = SwitchTest(0); 1.33 +