summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.9_Equality_Operators/11.9.2_The_Does_not_equals_Operator/S11.9.2_A4.1_T1.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.9_Equality_Operators/11.9.2_The_Does_not_equals_Operator/S11.9.2_A4.1_T1.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.9_Equality_Operators/11.9.2_The_Does_not_equals_Operator/S11.9.2_A4.1_T1.js55
1 files changed, 55 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.9_Equality_Operators/11.9.2_The_Does_not_equals_Operator/S11.9.2_A4.1_T1.js b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.9_Equality_Operators/11.9.2_The_Does_not_equals_Operator/S11.9.2_A4.1_T1.js
new file mode 100644
index 000000000..c45992ac5
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.9_Equality_Operators/11.9.2_The_Does_not_equals_Operator/S11.9.2_A4.1_T1.js
@@ -0,0 +1,55 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S11.9.2_A4.1_T1;
+ * @section: 11.9.2, 11.9.3;
+ * @assertion: If x or y is NaN, return true;
+ * @description: x is NaN;
+*/
+
+//CHECK#1
+if ((Number.NaN != true) !== true) {
+ $ERROR('#1: (NaN != true) === true');
+}
+
+//CHECK#2
+if ((Number.NaN != 1) !== true) {
+ $ERROR('#2: (NaN != 1) === true');
+}
+
+//CHECK#3
+if ((Number.NaN != Number.NaN) !== true) {
+ $ERROR('#3: (NaN != NaN) === true');
+}
+
+//CHECK#4
+if ((Number.NaN != Number.POSITIVE_INFINITY) !== true) {
+ $ERROR('#4: (NaN != +Infinity) === true');
+}
+
+//CHECK#5
+if ((Number.NaN != Number.NEGATIVE_INFINITY) !== true) {
+ $ERROR('#5: (NaN != -Infinity) === true');
+}
+
+//CHECK#6
+if ((Number.NaN != Number.MAX_VALUE) !== true) {
+ $ERROR('#6: (NaN != Number.MAX_VALUE) === true');
+}
+
+//CHECK#7
+if ((Number.NaN != Number.MIN_VALUE) !== true) {
+ $ERROR('#7: (NaN != Number.MIN_VALUE) === true');
+}
+
+//CHECK#8
+if ((Number.NaN != "string") !== true) {
+ $ERROR('#8: (NaN != "string") === true');
+}
+
+//CHECK#9
+if ((Number.NaN != new Object()) !== true) {
+ $ERROR('#9: (NaN != new Object()) === true');
+}
+