summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/13_drhtz-drhfz.js33
1 files changed, 30 insertions, 3 deletions
diff --git a/test/13_drhtz-drhfz.js b/test/13_drhtz-drhfz.js
index b2067c9..32e314c 100644
--- a/test/13_drhtz-drhfz.js
+++ b/test/13_drhtz-drhfz.js
@@ -47,7 +47,16 @@ describe("drhtz() and drhfz()", function() {
];
tests.forEach(function(test) {
test.slice(3).forEach(function(f) {
- it("correctly round " + test[0] +
+ var rule;
+ switch (f) {
+ case drhtz:
+ rule = "toward zero";
+ break;
+ case drhfz:
+ rule = "away from zero";
+ break;
+ }
+ it("correctly round " + rule + " " + test[0] +
" with precision " + test[1] + " to " +
test[2], function() {
assert.equal(
@@ -71,7 +80,16 @@ describe("drhtz() and drhfz()", function() {
];
tests.forEach(function(test) {
test.slice(3).forEach(function(f) {
- it("correctly round " + test[0] +
+ var rule;
+ switch (f) {
+ case drhtz:
+ rule = "toward zero";
+ break;
+ case drhfz:
+ rule = "away from zero";
+ break;
+ }
+ it("correctly round " + rule + " " + test[0] +
" with precision " + test[1] + " to " +
test[2], function() {
assert.equal(
@@ -88,7 +106,16 @@ describe("drhtz() and drhfz()", function() {
];
tests.forEach(function(test) {
test.slice(3).forEach(function(f) {
- it("correctly round " + test[0] +
+ var rule;
+ switch (f) {
+ case drhtz:
+ rule = "toward zero";
+ break;
+ case drhfz:
+ rule = "away from zero";
+ break;
+ }
+ it("correctly round " + rule + " " + test[0] +
" with precision " + test[1] + " to " +
test[2], function() {
assert.equal(