1
0
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:
Michael Mclaughlin 2016-03-09 22:54:34 +00:00
parent 6ec2449a07
commit ff621c1e35
3 changed files with 7 additions and 7 deletions

View File

@ -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') {

View File

@ -84,7 +84,7 @@
if (!module) {
time = new Date() - time;
document.body.innerHTML +=
'<br><br>&nbsp;In total, ' + passed + ' of ' + total + ' tests passed in ' + (time / 1e3) + ' secs.<br>';
'<br>&nbsp;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 += '&nbsp;Testing decimal.js<br>';
document.body.innerHTML += '&nbsp;Testing decimal.js<br><br>';
load();
</script>
</body>

View File

@ -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');