summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.4.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.1_T1.4.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.1_T1.4.js25
1 files changed, 25 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.1_T1.4.js b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.4.js
new file mode 100644
index 000000000..4b94f5a79
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.4.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.13.2_A2.1_T1.4;
+ * @section: 11.13.2;
+ * @assertion: Operator uses GetValue;
+ * @description: Either Type is not Reference or GetBase is not null, check opeartor is "x += y";
+*/
+
+//CHECK#1
+var x = 1;
+var z = (x += 1);
+if (z !== 2) {
+ $ERROR('#1: var x = 1; var z = (x += 1); z === 2. Actual: ' + (z));
+}
+
+//CHECK#2
+var x = 1;
+var y = 1;
+var z = (x += y);
+if (z !== 2) {
+ $ERROR('#2: var x = 1; var y = 1; var z = (x += y); z === 2. Actual: ' + (z));
+}
+