From aa77f433e44bacbd96e720a6a11e40e105a78aa8 Mon Sep 17 00:00:00 2001 From: Stefan Thomas Date: Thu, 21 Feb 2013 23:06:12 +0100 Subject: [PATCH] JS: Failing test. Amount#equals does not compare exponent. --- test/amount-test.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/amount-test.js b/test/amount-test.js index 550dc29634..42674b91b3 100644 --- a/test/amount-test.js +++ b/test/amount-test.js @@ -218,6 +218,11 @@ buster.testCase("Amount", { "Divide EUR by XRP, neg, <1" : function () { buster.assert.equals("-0.05/EUR/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", Amount.from_json("-100/EUR/rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh").divide(Amount.from_json("2000")).to_text_full()); } + }, + "Amount comparisons" : { + "10 USD != 100 USD" : function () { + buster.refute(Amount.from_json("10/USD/rNDKeo9RrCiRdfsMG8AdoZvNZxHASGzbZL").equals(Amount.from_json("100/USD/rNDKeo9RrCiRdfsMG8AdoZvNZxHASGzbZL"))); + } } });