summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.6_Additive_Operators/11.6.2_The_Subtraction_operator/S11.6.2_A2.1_T1.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.6_Additive_Operators/11.6.2_The_Subtraction_operator/S11.6.2_A2.1_T1.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.6_Additive_Operators/11.6.2_The_Subtraction_operator/S11.6.2_A2.1_T1.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.6_Additive_Operators/11.6.2_The_Subtraction_operator/S11.6.2_A2.1_T1.js b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.6_Additive_Operators/11.6.2_The_Subtraction_operator/S11.6.2_A2.1_T1.js
new file mode 100644
index 000000000..fccf203e4
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.6_Additive_Operators/11.6.2_The_Subtraction_operator/S11.6.2_A2.1_T1.js
@@ -0,0 +1,42 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S11.6.2_A2.1_T1;
+* @section: 11.6.2;
+* @assertion: Operator x - y uses GetValue;
+* @description: Either Type is not Reference or GetBase is not null;
+*/
+
+//CHECK#1
+if (1 - 1 !== 0) {
+ $ERROR('#1: 1 - 1 === 0. Actual: ' + (1 - 1));
+}
+
+//CHECK#2
+var x = 1;
+if (x - 1 !== 0) {
+ $ERROR('#2: var x = 1; x - 1 === 0. Actual: ' + (x - 1));
+}
+
+//CHECK#3
+var y = 1;
+if (1 - y !== 0) {
+ $ERROR('#3: var y = 1; 1 - y === 0. Actual: ' + (1 - y));
+}
+
+//CHECK#4
+var x = 1;
+var y = 1;
+if (x - y !== 0) {
+ $ERROR('#4: var x = 1; var y = 1; x - y === 0. Actual: ' + (x - y));
+}
+
+//CHECK#5
+var objectx = new Object();
+var objecty = new Object();
+objectx.prop = 1;
+objecty.prop = 1;
+if (objectx.prop - objecty.prop !== 0) {
+ $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop - objecty.prop === 0. Actual: ' + (objectx.prop - objecty.prop));
+}