summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.9_Equality_Operators/11.9.4_The_Strict_Equals_Operator/S11.9.4_A2.4_T2.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.9_Equality_Operators/11.9.4_The_Strict_Equals_Operator/S11.9.4_A2.4_T2.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.9_Equality_Operators/11.9.4_The_Strict_Equals_Operator/S11.9.4_A2.4_T2.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.9_Equality_Operators/11.9.4_The_Strict_Equals_Operator/S11.9.4_A2.4_T2.js b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.9_Equality_Operators/11.9.4_The_Strict_Equals_Operator/S11.9.4_A2.4_T2.js
new file mode 100644
index 000000000..b056bed4f
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.9_Equality_Operators/11.9.4_The_Strict_Equals_Operator/S11.9.4_A2.4_T2.js
@@ -0,0 +1,25 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S11.9.4_A2.4_T2;
+ * @section: 11.9.4;
+ * @assertion: First expression is evaluated first, and then second expression;
+ * @description: Checking with "throw";
+*/
+
+//CHECK#1
+var x = function () { throw "x"; };
+var y = function () { throw "y"; };
+try {
+ x() === y();
+ $ERROR('#1.1: var x = function () { throw "x"; }; var y = function () { throw "y"; }; x() === y() throw "x". Actual: ' + (x() === y()));
+} catch (e) {
+ if (e === "y") {
+ $ERROR('#1.2: First expression is evaluated first, and then second expression');
+ } else {
+ if (!(e === "x")) {
+ $ERROR('#1.3: var x = function () { throw "x"; }; var y = function () { throw "y"; }; x() === y() throw "x". Actual: ' + (e));
+ }
+ }
+}