Commit graph

69 commits

Author SHA1 Message Date
Alexis Hildebrandt
ce903c1a5e [tests] Fix compiler warning 2015-01-11 09:38:24 +01:00
tripun
0e1ced72bd Revert "add unit test printing for balance_t" until issue is fixed.
Getting different output on system than travis-ci.

This reverts commit 272e3cb3799937dcd3c379de56b299a3cbde52ca.
2014-08-11 21:01:26 +05:30
tripun
84b9ca73aa add unit test printing for balance_t 2014-08-11 21:01:26 +05:30
tripun
3c04ea50ac add unit test of Zero for balance_t 2014-08-11 21:01:26 +05:30
tripun
7e817d45d9 add unit test Truth for balance_t 2014-08-11 21:01:26 +05:30
tripun
c5f41b8519 add unit test Round for balance_t 2014-08-11 21:01:25 +05:30
tripun
3a35d16c28 add unit test Floor for balance_t 2014-08-11 21:01:25 +05:30
tripun
e94efddfb6 add unit test Ceiling for balance_t 2014-08-11 21:01:25 +05:30
tripun
264f8c553c add unit test Absolute for balance_t 2014-08-11 21:01:25 +05:30
tripun
c24fbd6dfb add unit test negation for balance_t 2014-08-11 21:01:25 +05:30
tripun
763c8c1162 add unit test for balance division 2014-08-11 21:01:25 +05:30
tripun
2db0bc9bf9 add test for multiplication 2014-08-11 21:01:25 +05:30
tripun
b9aef7b1ec edited subraction test 2014-08-11 21:01:24 +05:30
tripun
fe91656aa1 add Equality unit test for balance 2014-08-11 21:01:24 +05:30
tripun
57877bf062 added boost subtraction unit test 2014-08-11 21:01:24 +05:30
tripun
696440e735 added balance addition unit test 2014-08-11 21:01:24 +05:30
tripun
6f39d1169d add balance Test constructors 2014-08-11 21:01:24 +05:30
Martin Michlmayr
2cee0fe23f Cosmetic change - format code consistently
Add a space between if and the opening bracket, between a closing
round bracket and the following opening curly bracket, etc.
2014-05-18 09:51:32 -04:00
Johann Klähn
89c21e9967 build shared library/python module, clean up CMake
libledger will now be built as a shared library. You can 'import ledger'
from python IFF you copy libledger.so to ledger.so or create a symlink.
2014-02-01 01:30:53 +01:00
Johann Klähn
a633bc7fce add unit tests for amount_t→floor/ceil 2013-01-15 21:17:11 +01:00
John Wiegley
4681e58d7f Converted the Ledger build system to use CMake 2012-05-20 04:48:05 -05:00
John Wiegley
363670d35b Tighten up argument passing related to fn_market() 2012-03-11 03:55:25 -05:00
John Wiegley
8ae2fb8721 Add support for valuation expressions on commodities 2012-03-05 23:01:41 -06:00
John Wiegley
8d6bf11334 All tests are working again but one 2012-03-05 05:03:52 -06:00
John Wiegley
c313cee085 Fixed several unit tests 2011-02-04 04:40:31 -05:00
John Wiegley
2a2c3c1cec Use Boost.Test instead of CppUnit 2011-02-04 03:43:33 -05:00
John Wiegley
7995e16762 Corrected a bug in report query parsing 2010-06-19 14:02:44 -04:00
John Wiegley
dea2aed0b5 Untabified all source files 2010-06-11 17:02:25 -04:00
John Wiegley
be6cef93c4 A further simplification of -V and -X
With -X COMM, all values are computed in terms of COMM, regardless.

With -V, only secondary commodities will ever be computed, never
primaries.  Further, if a secondary commodities has an associated price,
the valuation is done in terms of that price's commodity.
2010-06-07 09:49:17 -04:00
John Wiegley
5cdd36f358 Further improved parsing of query expressions
Fixes #210 / D4C2DD6F-8967-4FFC-BBBC-A941F9C53475
2010-06-01 18:33:13 -04:00
John Wiegley
038c24357e Changed --european option to --decimal-comma
Fixes #211 / 1736ACA5-5DE6-4826-AEB4-DB5B2A2217AC
2010-06-01 17:56:41 -04:00
John Wiegley
b2c426abae Fixed one of the ExprTests 2009-11-15 22:13:53 -05:00
John Wiegley
c3535d06c8 Redesigned the expr_t, predicate_t, query_t classes 2009-11-09 02:06:06 -05:00
John Wiegley
d6d8ed6d99 Fixes to the Python unit tests 2009-10-28 23:09:35 -04:00
John Wiegley
9a07652fd8 Disabled some of the expression tests under Python 2009-10-28 22:50:33 -04:00
John Wiegley
47df7dd60e Rewrote the report query parser
It is now a full parser that parses report queries directly into value
expression trees.  These then get rendered into text so that other
options may extend the expression.
2009-10-28 18:40:31 -04:00
John Wiegley
05529b2c68 Call times_initialize/shutdown in the unit tests 2009-10-25 05:40:26 -04:00
John Wiegley
092bda1435 Don't increase precision so much when dividing
Slow the increase in internal precision when dividing amounts.

Use "--debug amount.convert" if you wish to see this logic in action, if
a case where incorrect rounding is suspected comes up.

Fixes B68FFB0D-A9A0-479C-A6C0-68853F229333
2009-06-15 17:52:38 +01:00
John Wiegley
dda7c3a58a Rewrote the date interval parser/stepper
The new implementation uses boost::gregorian::date_duration objects,
rather than manually stepping.
2009-03-23 01:22:26 -04:00
John Wiegley
110f0b8023 Enabled use of pre-compiled headers by default 2009-03-10 17:02:03 -04:00
John Wiegley
c11d325712 Reduced the #include dependency tree to a minimum 2009-03-04 23:53:43 -04:00
John Wiegley
38122c2224 Corrected warnings g++-4.3.3 was complaining about 2009-02-28 04:54:54 -04:00
John Wiegley
f7f07310f4 Be smarter about trimming off trailing zeroes 2009-02-27 13:58:30 -04:00
John Wiegley
55a6d588ff Allow uncommoditized amounts to +/- with an amount
Thus, you can say "$100 + 10" to increase it by $10.
2009-02-25 23:40:15 -04:00
John Wiegley
f13709f71a Be smarter about printing uncommoditized amounts 2009-02-24 15:13:21 -04:00
John Wiegley
d525db35d8 Restored the use of Python unit tests 2009-02-24 13:16:28 -04:00
John Wiegley
e124811d8a Added --exchange (-x) option
This is like -V, except it lets you specify the goal commodity to report
in terms of, for example:

    reg -x CAD
2009-02-22 04:51:11 -04:00
John Wiegley
fc349389e3 Restored the --budget option 2009-02-20 23:12:23 -04:00
John Wiegley
3826cb1bee Re-enabled parsing of timelog data 2009-02-19 15:50:24 -04:00
John Wiegley
d0a664d102 Fixed several unused value and param warnings 2009-02-16 16:55:18 -04:00