summaryrefslogtreecommitdiff
path: root/test/suite/intl402/ch11/11.3/11.3.2_FN_1.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/suite/intl402/ch11/11.3/11.3.2_FN_1.js')
-rw-r--r--test/suite/intl402/ch11/11.3/11.3.2_FN_1.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/suite/intl402/ch11/11.3/11.3.2_FN_1.js b/test/suite/intl402/ch11/11.3/11.3.2_FN_1.js
new file mode 100644
index 000000000..5f14e7772
--- /dev/null
+++ b/test/suite/intl402/ch11/11.3/11.3.2_FN_1.js
@@ -0,0 +1,19 @@
+// Copyright 2012 Google Inc. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @description Tests that Intl.NumberFormat.prototype.format
+ * doesn't treat all numbers as negative.
+ * @author: Roozbeh Pournader
+ */
+
+var formatter = new Intl.NumberFormat();
+
+if (formatter.format(1) === formatter.format(-1)) {
+ $ERROR('Intl.NumberFormat is formatting 1 and -1 the same way.');
+}
+
+if (formatter.format(-0) !== formatter.format(0)) {
+ $ERROR('Intl.NumberFormat is formatting signed zeros differently.');
+}
+