1
0
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:
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('min and max');
T('min and max', function () {
function t(min, max, arr) {
T.assertEqual(new Decimal(max).valueOf(), Decimal.max.apply(Decimal, arr).valueOf());
@@ -73,6 +72,4 @@ if (typeof T === 'undefined') require('../setup');
t(0, 1, [1, '1e-9000000000000001', 1e-200]);
t(-0, 1, [1, '-1e-9000000000000001', 1e-200]);
t(-3, 3, [1, '2', 3, '-1', -2, '-3']);
T.stop();
})();
});