summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A2.2.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A2.2.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A2.2.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A2.2.js b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A2.2.js
new file mode 100644
index 000000000..348252b8b
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A2.2.js
@@ -0,0 +1,24 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S12.6.3_A2.2;
+* @section: 12.6.3;
+* @assertion: While evaluating "for (ExpressionNoIn;;) Statement", Statement is evaulated first;
+* @description: Using "(function(){throw "NoInExpression"})()" as ExpressionNoIn;
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+try {
+ for((function(){throw "NoInExpression"})();;) {
+ throw "Statement";
+ }
+ $ERROR('#1: (function(){throw "NoInExpression"})() lead to throwing exception');
+} catch (e) {
+ if (e !== "NoInExpression") {
+ $ERROR('#1: When for (ExpressionNoIn ; ; ) Statement is evaluated NoInExpression evaluates first');
+ }
+}
+//
+//////////////////////////////////////////////////////////////////////////////