aboutsummaryrefslogtreecommitdiffstats
path: root/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.5_The_Number_Type/S8.5_A11_T2.js
diff options
context:
space:
mode:
authorDavid Fugate <dfugate@microsoft.com>2011-06-28 10:36:30 -0700
committerDavid Fugate <dfugate@microsoft.com>2011-06-28 10:36:30 -0700
commit0005b0b87b55ee11277e414c4063ae97b3c793e1 (patch)
treefc37bea04c3ff1cf21dff9ee02f51f2757958cd9 /external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.5_The_Number_Type/S8.5_A11_T2.js
parent55855b285e67bc29e567c515459726cb1a110163 (diff)
parente69a5fa68f7b946e385786ab13981385b769db64 (diff)
Merged remote changes
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.5_The_Number_Type/S8.5_A11_T2.js')
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.5_The_Number_Type/S8.5_A11_T2.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.5_The_Number_Type/S8.5_A11_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.5_The_Number_Type/S8.5_A11_T2.js
new file mode 100644
index 000000000..a0d0e29f6
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.5_The_Number_Type/S8.5_A11_T2.js
@@ -0,0 +1,37 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S8.5_A11_T2;
+ * @section: 8.5, 7.8.3;
+ * @assertion: The integer 0 has two representations, +0 and -0;
+ * @description: Compare positive_zero and negative_zero;
+*/
+
+var p_zero=+0;
+var n_zero=-0;
+
+//CHECK #1
+if ((p_zero == n_zero) !== true){
+ $ERROR('#1: var p_zero=+0; var n_zero=-0; p_zero != n_zero');
+}
+
+//CHECK #2
+if ((n_zero == 0) !== true){
+ $ERROR('#2: var p_zero=+0; var n_zero=-0; n_zero == 0');
+}
+
+//CHECK #3
+if ((p_zero == -0) !== true){
+ $ERROR('#3: var p_zero=+0; var n_zero=-0; p_zero == -0');
+}
+
+//CHECK #4
+if ((p_zero === 0) !== true){
+ $ERROR('#4: var p_zero=+0; var n_zero=-0; p_zero === 0');
+}
+
+//CHECK #5
+if ((n_zero === -0) !== true){
+ $ERROR('#5: var p_zero=+0; var n_zero=-0; n_zero === -0');
+}