summaryrefslogtreecommitdiff
path: root/test/unit/t_amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-28 04:54:54 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-28 04:54:54 -0400
commit38122c22241cb8fe64f0d17cd3b084418f49edaa (patch)
tree9383f2082602f2d71dde5328fa8bcf3f6609a5b7 /test/unit/t_amount.cc
parentfb129fa7a1b293d3a04513aee3ca4a489f094754 (diff)
downloadfork-ledger-38122c22241cb8fe64f0d17cd3b084418f49edaa.tar.gz
fork-ledger-38122c22241cb8fe64f0d17cd3b084418f49edaa.tar.bz2
fork-ledger-38122c22241cb8fe64f0d17cd3b084418f49edaa.zip
Corrected warnings g++-4.3.3 was complaining about
Diffstat (limited to 'test/unit/t_amount.cc')
-rw-r--r--test/unit/t_amount.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/unit/t_amount.cc b/test/unit/t_amount.cc
index 7f0ae669..05505fda 100644
--- a/test/unit/t_amount.cc
+++ b/test/unit/t_amount.cc
@@ -369,10 +369,10 @@ void AmountTestCase::testCommodityEquality()
assertTrue(x0.is_null());
assertThrow(x0.is_zero(), amount_error);
assertThrow(x0.is_realzero(), amount_error);
- assertThrow(x0.sign() == 0, amount_error);
- assertThrow(x0.compare(x1) < 0, amount_error);
- assertThrow(x0.compare(x2) > 0, amount_error);
- assertThrow(x0.compare(x0) == 0, amount_error);
+ assertThrow(x0.sign(), amount_error);
+ assertThrow(x0.compare(x1), amount_error);
+ assertThrow(x0.compare(x2), amount_error);
+ assertThrow(x0.compare(x0), amount_error);
assertTrue(x1 != x2);
assertTrue(x1 != x4);
@@ -1170,7 +1170,9 @@ void AmountTestCase::testTruth()
amount_t x1("1234");
amount_t x2("1234.56");
- assertThrow(x0 ? 1 : 0, amount_error);
+#ifndef NOT_FOR_PYTHON
+ assertThrow(x0.operator bool(), amount_error);
+#endif // NOT_FOR_PYTHON
assertTrue(x1);
assertTrue(x2);