mirror of https://github.com/tc39/test262.git
Move the extra precision tests into separate files
This will allow implementations to test the rest of the number formatting tests, even if the extra precision support isn't implemented.
This commit is contained in:
parent
4bc96880a1
commit
d9f67d53d1
32
test/intl402/NumberFormat/prototype/format/format-fraction-digits-precision.js
vendored
Normal file
32
test/intl402/NumberFormat/prototype/format/format-fraction-digits-precision.js
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
// Copyright 2011-2012 Norbert Lindenberg. All rights reserved.
|
||||
// Copyright 2012 Mozilla Corporation. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.3.2_TRF
|
||||
description: >
|
||||
Tests that the digits are determined correctly when specifying
|
||||
pre/post decimal digits.
|
||||
author: Norbert Lindenberg
|
||||
includes: [testIntl.js]
|
||||
---*/
|
||||
|
||||
var locales = [
|
||||
new Intl.NumberFormat().resolvedOptions().locale,
|
||||
"ar", "de", "th", "ja"
|
||||
];
|
||||
var numberingSystems = [
|
||||
"arab",
|
||||
"latn",
|
||||
"thai",
|
||||
"hanidec"
|
||||
];
|
||||
var testData = {
|
||||
// Ref tc39/ecma402#128
|
||||
"12344501000000000000000000000000000": "12344501000000000487815444678311936.0",
|
||||
"-12344501000000000000000000000000000": "-12344501000000000487815444678311936.0"
|
||||
};
|
||||
|
||||
testNumberFormat(locales, numberingSystems,
|
||||
{useGrouping: false, minimumIntegerDigits: 3, minimumFractionDigits: 1, maximumFractionDigits: 3},
|
||||
testData);
|
|
@ -48,9 +48,6 @@ var testData = {
|
|||
"-0.0000000012344501": "-000.0",
|
||||
"123445.01": "123445.01",
|
||||
"-123445.01": "-123445.01",
|
||||
// Ref tc39/ecma402#128
|
||||
"12344501000000000000000000000000000": "12344501000000000487815444678311936.0",
|
||||
"-12344501000000000000000000000000000": "-12344501000000000487815444678311936.0"
|
||||
};
|
||||
|
||||
testNumberFormat(locales, numberingSystems,
|
||||
|
|
32
test/intl402/NumberFormat/prototype/format/format-significant-digits-precision.js
vendored
Normal file
32
test/intl402/NumberFormat/prototype/format/format-significant-digits-precision.js
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
// Copyright 2011-2012 Norbert Lindenberg. All rights reserved.
|
||||
// Copyright 2012 Mozilla Corporation. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es5id: 11.3.2_TRP
|
||||
description: >
|
||||
Tests that the digits are determined correctly when specifying
|
||||
significant digits.
|
||||
author: Norbert Lindenberg
|
||||
includes: [testIntl.js]
|
||||
---*/
|
||||
|
||||
var locales = [
|
||||
new Intl.NumberFormat().resolvedOptions().locale,
|
||||
"ar", "de", "th", "ja"
|
||||
];
|
||||
var numberingSystems = [
|
||||
"arab",
|
||||
"latn",
|
||||
"thai",
|
||||
"hanidec"
|
||||
];
|
||||
var testData = {
|
||||
// Ref tc39/ecma402#128
|
||||
"123.44500": "123.44",
|
||||
"-123.44500": "-123.44",
|
||||
};
|
||||
|
||||
testNumberFormat(locales, numberingSystems,
|
||||
{useGrouping: false, minimumSignificantDigits: 3, maximumSignificantDigits: 5},
|
||||
testData);
|
|
@ -32,9 +32,6 @@ var testData = {
|
|||
"-123.45": "-123.45",
|
||||
"123.44499": "123.44",
|
||||
"-123.44499": "-123.44",
|
||||
// Ref tc39/ecma402#128
|
||||
"123.44500": "123.44",
|
||||
"-123.44500": "-123.44",
|
||||
"123.44501": "123.45",
|
||||
"-123.44501": "-123.45",
|
||||
"0.001234": "0.001234",
|
||||
|
|
Loading…
Reference in New Issue