summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/10_dadd.js7
1 files changed, 7 insertions, 0 deletions
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");
+ });
});