mirror of
https://github.com/MikeMcl/decimal.js.git
synced 2026-09-23 12:24:47 +00:00
refactor tests
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
if (typeof T === 'undefined') require('../setup');
|
||||
|
||||
(function () {
|
||||
T('trunc');
|
||||
T('trunc', function () {
|
||||
|
||||
function t(expected, n) {
|
||||
T.assertEqual(expected, Decimal.trunc(n).valueOf());
|
||||
@@ -83,12 +82,10 @@ if (typeof T === 'undefined') require('../setup');
|
||||
t('4125789711001606948191', '4125789711001606948191.4707575965791242737346836');
|
||||
t('-6935501', '-6935501.294727166142750626019282');
|
||||
t('-1', '-1.518418076611593764852321765899');
|
||||
t('-35416', '-35416');
|
||||
t('6912783515683955988122411164548', '6912783515683955988122411164548.393');
|
||||
t('657', '657.0353902852');
|
||||
t('0', '0.00000000000000000000000017921822306362413915');
|
||||
t('1483059355427939255846407887', '1483059355427939255846407887.011361095342689876');
|
||||
t('0', '0.00000005');
|
||||
t('8551283060956479352', '8551283060956479352.5707396');
|
||||
t('0', '0.000000000000000000000000019904267');
|
||||
t('321978830777554620127500539', '321978830777554620127500539.339278568133088682532238002577');
|
||||
@@ -125,6 +122,4 @@ if (typeof T === 'undefined') require('../setup');
|
||||
t('-Infinity', '-1e+9000000000000001');
|
||||
t('5.5879983320336874473209567979e+287894365', '5.5879983320336874473209567979e+287894365');
|
||||
t('-5.5879983320336874473209567979e+287894365', '-5.5879983320336874473209567979e+287894365');
|
||||
|
||||
T.stop();
|
||||
})();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user