You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
MikeMcl_decimal.js/test/test.js

77 lines
1.0 KiB

8 years ago
var time = new Date(),
passed = 0,
total = 0;
8 years ago
console.log('\n Testing decimal.js\n');
8 years ago
[
8 years ago
'abs',
'acos',
'acosh',
'asin',
'asinh',
'atan',
'atan2',
'atanh',
'cbrt',
'ceil',
'clamp',
8 years ago
'clone',
'cmp',
'config',
'cos',
'cosh',
'Decimal',
'div',
'divToInt',
'dpSd',
'exp',
'floor',
'hypot',
'immutability',
'intPow',
'isFiniteEtc',
'ln',
'log',
'log10',
'log2',
'minAndMax',
'minus',
'mod',
'neg',
'plus',
'pow',
'random',
'round',
'sign',
'sin',
'sinh',
'sqrt',
'sum',
8 years ago
'tan',
'tanh',
'times',
'toBinary',
'toDP',
'toExponential',
'toFixed',
'toFraction',
'toHex',
'toNearest',
'toNumber',
'toOctal',
'toPrecision',
'toSD',
'toString',
'trunc',
'valueOf'
8 years ago
]
.forEach(function (module) {
require('./modules/' + module);
passed += T.result[0];
total += T.result[1];
});
8 years ago
time = new Date() - time;
console.log('\n In total, ' + passed + ' of ' + total + ' tests passed in ' + (time / 1e3) + ' secs.\n');