diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-30 15:57:03 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-30 15:57:03 -0400 |
commit | 80f87bc1000c46f7065e42cd6b0abd8a44f57bb4 (patch) | |
tree | 431e6bd992d1c7bd9dcaba9005bbdf5452bdb13f | |
parent | 544f69108bb67148bad160bef4e291e5c7083917 (diff) | |
download | fork-ledger-80f87bc1000c46f7065e42cd6b0abd8a44f57bb4.tar.gz fork-ledger-80f87bc1000c46f7065e42cd6b0abd8a44f57bb4.tar.bz2 fork-ledger-80f87bc1000c46f7065e42cd6b0abd8a44f57bb4.zip |
Corrected a failing test.
-rwxr-xr-x | acprep | 3 | ||||
-rw-r--r-- | commodity.h | 2 | ||||
-rw-r--r-- | test/numerics/t_amount.cc | 4 |
3 files changed, 6 insertions, 3 deletions
@@ -26,7 +26,8 @@ cat configure.tmpl | \ autoreconf --force --install -INCDIRS="-I/usr/local/include -I/opt/local/include" +INCDIRS="-isystem /usr/local/include" +INCDIRS="$INCDIRS -isystem /opt/local/include" INCDIRS="$INCDIRS -isystem /usr/local/include/boost-1_35" LIBDIRS="-L/usr/local/lib -L/opt/local/lib" diff --git a/commodity.h b/commodity.h index 6f837942..94aa6b08 100644 --- a/commodity.h +++ b/commodity.h @@ -53,6 +53,8 @@ class commodity_t public: class base_t : public noncopyable, public supports_flags<> { + base_t(); + public: typedef std::map<const datetime_t, amount_t> history_map; typedef std::pair<const datetime_t, amount_t> history_pair; diff --git a/test/numerics/t_amount.cc b/test/numerics/t_amount.cc index 3fb6b0ee..69d97af3 100644 --- a/test/numerics/t_amount.cc +++ b/test/numerics/t_amount.cc @@ -1379,8 +1379,8 @@ void AmountTestCase::testCommodityForZero() { amount_t x1(internalAmount("$0.000000000000000000001")); - assertFalse(x1); - assertTrue(x1.is_zero()); + assertTrue(x1); // an internal amount never betrays its precision + assertFalse(x1.is_zero()); assertFalse(x1.is_realzero()); assertValid(x1); |