test262/test/intl402/11.3.2_FN_1.js

21 lines
587 B
JavaScript
Raw Normal View History

2012-04-16 22:23:13 +02:00
// Copyright 2012 Google Inc. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
2014-07-25 00:41:42 +02:00
es5id: 11.3.2_FN_1
description: >
Tests that Intl.NumberFormat.prototype.format doesn't treat all
numbers as negative.
2014-07-25 00:41:42 +02:00
author: Roozbeh Pournader
---*/
2012-04-16 22:23:13 +02:00
var formatter = new Intl.NumberFormat();
2012-04-16 22:23:13 +02:00
if (formatter.format(1) === formatter.format(-1)) {
2012-04-16 22:23:13 +02:00
$ERROR('Intl.NumberFormat is formatting 1 and -1 the same way.');
}
2012-04-16 22:23:13 +02:00
if (formatter.format(-0) !== formatter.format(0)) {
2012-04-16 22:23:13 +02:00
$ERROR('Intl.NumberFormat is formatting signed zeros differently.');
}