aboutsummaryrefslogtreecommitdiffstats
path: root/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.4.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.4.js')
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.4.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.4.js
new file mode 100644
index 000000000..65b071b4d
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.4.js
@@ -0,0 +1,21 @@
+// 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.1_T2.4;
+ * @section: 11.13.2;
+ * @assertion: Operator uses GetValue;
+ * @description: If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x += y";
+*/
+
+//CHECK#1
+try {
+ var x = 1;
+ var z = (x += y);
+ $ERROR('#1.1: var x = 1; x += y throw ReferenceError. Actual: ' + (z));
+}
+catch (e) {
+ if ((e instanceof ReferenceError) !== true) {
+ $ERROR('#1.2: var x = 1; x += y throw ReferenceError. Actual: ' + (e));
+ }
+}