summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.6_Additive_Operators/11.6.2_The_Subtraction_operator/S11.6.2_A4_T2.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_A4_T2.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_A4_T2.js22
1 files changed, 22 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_A4_T2.js b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.6_Additive_Operators/11.6.2_The_Subtraction_operator/S11.6.2_A4_T2.js
new file mode 100644
index 000000000..02955bc45
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.6_Additive_Operators/11.6.2_The_Subtraction_operator/S11.6.2_A4_T2.js
@@ -0,0 +1,22 @@
+// 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_A4_T2;
+* @section: 11.6.2, 11.6.3;
+* @assertion: Operator x - y produces the same result as x + (-y);
+* @description: The difference of two infinities of opposite sign is the infinity of minuend sign;
+*/
+
+//CHECK#1
+if (Number.POSITIVE_INFINITY - Number.NEGATIVE_INFINITY !== Number.POSITIVE_INFINITY ) {
+ $ERROR('#1: Infinity - -Infinity === Infinity. Actual: ' + (Infinity - -Infinity));
+}
+
+//CHECK#2
+if (Number.NEGATIVE_INFINITY - Number.POSITIVE_INFINITY !== Number.NEGATIVE_INFINITY ) {
+ $ERROR('#2: -Infinity - Infinity === -Infinity. Actual: ' + (-Infinity - Infinity));
+}
+
+
+