mirror of
https://github.com/tc39/test262.git
synced 2025-08-28 13:28:38 +02:00
20 lines
564 B
JavaScript
20 lines
564 B
JavaScript
// 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.');
|
|
}
|
|
|