mirror of
https://github.com/MikeMcl/decimal.js.git
synced 2024-10-27 20:34:12 +00:00
Add newline to single test results
This commit is contained in:
parent
6ec2449a07
commit
ff621c1e35
@ -5,14 +5,14 @@ T = (function () {
|
||||
|
||||
function T(name, tests) {
|
||||
var time;
|
||||
write('\n Testing ' + name + '...');
|
||||
write(' Testing ' + name + '...');
|
||||
passed = testNumber = 0;
|
||||
time = new Date();
|
||||
tests();
|
||||
time = new Date() - time;
|
||||
T.result = [passed, testNumber, time];
|
||||
if (passed !== testNumber) write('\n');
|
||||
write(' ' + passed + ' of ' + testNumber + ' tests passed in ' + time + ' ms');
|
||||
write(' ' + passed + ' of ' + testNumber + ' tests passed in ' + time + ' ms\n');
|
||||
}
|
||||
|
||||
if (typeof window != 'undefined') {
|
||||
|
@ -84,7 +84,7 @@
|
||||
if (!module) {
|
||||
time = new Date() - time;
|
||||
document.body.innerHTML +=
|
||||
'<br><br> In total, ' + passed + ' of ' + total + ' tests passed in ' + (time / 1e3) + ' secs.<br>';
|
||||
'<br> In total, ' + passed + ' of ' + total + ' tests passed in ' + (time / 1e3) + ' secs.<br>';
|
||||
document.body.scrollIntoView(false);
|
||||
return;
|
||||
}
|
||||
@ -105,7 +105,7 @@
|
||||
head.appendChild(script);
|
||||
}
|
||||
|
||||
document.body.innerHTML += ' Testing decimal.js<br>';
|
||||
document.body.innerHTML += ' Testing decimal.js<br><br>';
|
||||
load();
|
||||
</script>
|
||||
</body>
|
||||
|
@ -2,7 +2,7 @@ var time = new Date(),
|
||||
passed = 0,
|
||||
total = 0;
|
||||
|
||||
console.log('\n Testing decimal.js');
|
||||
console.log('\n Testing decimal.js\n');
|
||||
|
||||
[
|
||||
'abs',
|
||||
@ -63,7 +63,7 @@ console.log('\n Testing decimal.js');
|
||||
'toSD',
|
||||
'toString',
|
||||
'trunc',
|
||||
'valueOf',
|
||||
'valueOf'
|
||||
]
|
||||
.forEach(function (module) {
|
||||
require('./modules/' + module);
|
||||
@ -72,4 +72,4 @@ console.log('\n Testing decimal.js');
|
||||
});
|
||||
|
||||
time = new Date() - time;
|
||||
console.log('\n\n In total, ' + passed + ' of ' + total + ' tests passed in ' + (time / 1e3) + ' secs.\n');
|
||||
console.log('\n In total, ' + passed + ' of ' + total + ' tests passed in ' + (time / 1e3) + ' secs.\n');
|
||||
|
Loading…
Reference in New Issue
Block a user