1
0
mirror of https://github.com/MikeMcl/decimal.js.git synced 2026-09-23 20:35:04 +00:00

refactor tests

This commit is contained in:
Michael Mclaughlin
2016-02-06 17:51:29 +00:00
parent 587b9fe82f
commit caad23d669
64 changed files with 308 additions and 549 deletions

View File

@@ -1,7 +1,6 @@
if (typeof T === 'undefined') require('../setup');
(function () {
T('toDecimalPlaces');
T('toDecimalPlaces', function () {
function t(expected, n, dp, rm) {
T.assertEqual(expected, new Decimal(n).toDP(dp, rm).valueOf());
@@ -529,6 +528,4 @@ if (typeof T === 'undefined') require('../setup');
tx(function () {new Decimal('12.345').toDP(1, '-1e-1')}, ".toDP(1, '-1e-1')");
tx(function () {new Decimal('12.345').toDP(1, Infinity)}, ".toDP(1, Infinity)");
tx(function () {new Decimal('12.345').toDP(1, '-Infinity')}, ".toDP(1, '-Infinity')");
T.stop();
})();
});