aboutsummaryrefslogtreecommitdiffstats
path: root/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.1_The_Equals_Operator/S11.9.1_A2.1_T1.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.1_The_Equals_Operator/S11.9.1_A2.1_T1.js')
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.1_The_Equals_Operator/S11.9.1_A2.1_T1.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.1_The_Equals_Operator/S11.9.1_A2.1_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.1_The_Equals_Operator/S11.9.1_A2.1_T1.js
new file mode 100644
index 000000000..8a751c0b3
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.9_Equality_Operators/11.9.1_The_Equals_Operator/S11.9.1_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.9.1_A2.1_T1;
+ * @section: 11.9.1;
+ * @assertion: Operator x == y uses GetValue;
+ * @description: Either Type is not Reference or GetBase is not null;
+*/
+
+//CHECK#1
+if ((1 == 1) !== true) {
+ $ERROR('#1: (1 == 1) === true');
+}
+
+//CHECK#2
+var x = 1;
+if ((x == 1) !== true) {
+ $ERROR('#2: var x = 1; (x == 1) === true');
+}
+
+//CHECK#3
+var y = 1;
+if ((1 == y) !== true) {
+ $ERROR('#3: var y = 1; (1 == y) === true');
+}
+
+//CHECK#4
+var x = 1;
+var y = 1;
+if ((x == y) !== true) {
+ $ERROR('#4: var x = 1; var y = 1; (x == y) === true');
+}
+
+//CHECK#5
+var objectx = new Object();
+var objecty = new Object();
+objectx.prop = 1;
+objecty.prop = 1;
+if ((objectx.prop == objecty.prop) !== true) {
+ $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; (objectx.prop == objecty.prop) === true');
+}