summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.11_The_switch_Statement/S12.11_A3_T2.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/12_Statement/12.11_The_switch_Statement/S12.11_A3_T2.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.11_The_switch_Statement/S12.11_A3_T2.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.11_The_switch_Statement/S12.11_A3_T2.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.11_The_switch_Statement/S12.11_A3_T2.js
new file mode 100644
index 000000000..fc1a9c71c
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.11_The_switch_Statement/S12.11_A3_T2.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S12.11_A3_T2;
+ * @section: 12.11;
+ * @assertion: Syntax constructions of switch statement;
+ * @description: Checking if execution of "switch {}" fails;
+ * @negative;
+*/
+
+function SwitchTest(value){
+ var result = 0;
+
+ switch {
+ case 0:
+ result += 2;
+ default:
+ result += 32;
+ break;
+ }
+
+ return result;
+}
+
+var x = SwitchTest(0);