From eac755d9997b7d7d0477b4d120329e29b5e53da8 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 06 Jan 2017 21:59:58 -0500 Subject: test/10_dadd.js: Test adding 0.01 10000 times --- diff --git a/test/10_dadd.js b/test/10_dadd.js index e182ee2..c329a1a 100644 --- a/test/10_dadd.js +++ b/test/10_dadd.js @@ -55,4 +55,11 @@ describe("dadd()", function() { assert.equal(dadd(test[0], test[1]), test[2]); }); }); + it("correctly adds 0.01 10000 times", function() { + var a = 0; + for (var i = 0; i < 10000; ++i) { + a = dadd(a, 0.01); + } + assert.equal(a, "100.00"); + }); }); -- cgit v0.9.1