From d3e090cb289698d6f7fca55b89ce92fbc1832cc6 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 07 Jan 2017 05:14:48 -0500 Subject: test/13_drhtz-drhfz.js: Differentiate between drhtz() and drhfz() --- 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( -- cgit v0.9.1