summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T9.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T9.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T9.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T9.js b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T9.js
new file mode 100644
index 000000000..791d7cf51
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T9.js
@@ -0,0 +1,23 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S11.13.2_A2.2_T9;
+ * @section: 11.13.2, 16;
+ * @assertion: Operator uses PutValue;
+ * @description: If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x &= y";
+* @negative
+*/
+
+//CHECK#1
+try {
+ var z = (1 &= 1);
+ $ERROR('#1.1: 1 &= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z));
+}
+catch (e) {
+ if ((e instanceof ReferenceError) !== true) {
+ $ERROR('#1.2: 1 &= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e));
+ } else {
+ var z = (1 &= 1);
+ }
+}