mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 21:45:04 +02:00
Update the test for negative zero in NumberFormat.
The specification was updated in https://github.com/tc39/ecma402/pull/232.
This commit is contained in:
parent
e9a5a7f918
commit
65f2d5e8c2
@ -6,6 +6,11 @@ es5id: 11.3.2_FN_1
|
|||||||
description: >
|
description: >
|
||||||
Tests that Intl.NumberFormat.prototype.format doesn't treat all
|
Tests that Intl.NumberFormat.prototype.format doesn't treat all
|
||||||
numbers as negative.
|
numbers as negative.
|
||||||
|
info: |
|
||||||
|
PartitionNumberPattern ( numberFormat, x )
|
||||||
|
1. If x is not NaN and x < 0 or _x_ is -0, then
|
||||||
|
a. Let _x_ be -_x_.
|
||||||
|
b. Let _pattern_ be _numberFormat_.[[NegativePattern]].
|
||||||
author: Roozbeh Pournader
|
author: Roozbeh Pournader
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -13,4 +18,4 @@ var formatter = new Intl.NumberFormat();
|
|||||||
|
|
||||||
assert.notSameValue(formatter.format(1), formatter.format(-1), 'Intl.NumberFormat is formatting 1 and -1 the same way.');
|
assert.notSameValue(formatter.format(1), formatter.format(-1), 'Intl.NumberFormat is formatting 1 and -1 the same way.');
|
||||||
|
|
||||||
assert.sameValue(formatter.format(-0), formatter.format(0), 'Intl.NumberFormat is formatting signed zeros differently.');
|
assert.notSameValue(formatter.format(0), formatter.format(-0), 'Intl.NumberFormat is formatting 0 and -0 the same way.');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user