summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.2_Variable_Statement/S12.2_A6_T2.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/12_Statement/12.2_Variable_Statement/S12.2_A6_T2.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.2_Variable_Statement/S12.2_A6_T2.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.2_Variable_Statement/S12.2_A6_T2.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.2_Variable_Statement/S12.2_A6_T2.js
new file mode 100644
index 000000000..a922cc90e
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.2_Variable_Statement/S12.2_A6_T2.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.2_A6_T2;
+* @section: 12.2;
+* @assertion: VariableDeclaration within "try-catch" statement is allowed;
+* @description: Declaring variables within "try-catch" statement;
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try{
+ intry__intry__var=intry__intry__var;
+ intry__incatch__var=intry__incatch__var;
+ incatch__intry__var=incatch__intry__var;
+ incatch__incatch__var=incatch__incatch__var;
+}catch(e){
+ $ERROR('#1: Variable declaration inside "try-catch" block is admitted');
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
+try{
+ try {
+ var intry__intry__var;
+ } catch (e) {
+ var intry__incatch__var;
+ }
+}catch(e){
+ try {
+ var incatch__intry__var;
+ } catch (e) {
+ var incatch__incatch__var;
+ }
+
+};