Works on GObjects. Asserts if the object isn't a GObject (which may be the case if it has already been finalized) or if the object's finalize method isn't called (indicating a leak).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22114 57a11ea4-9604-0410-9ed3-97b8803252fd
Now the assert reports the location in the test program where it fails instead of inside test-stuff.c.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22113 57a11ea4-9604-0410-9ed3-97b8803252fd
As usual, re-indentation was done using astyle-1.24 using the following options:
astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21816 57a11ea4-9604-0410-9ed3-97b8803252fd
Add an GTestFatalFunc which can examine a list of error conditions and suppress those messages and prevent their exiting while passing through any unexpected errors.
Rename test_silent_logger to test_null_handler and change it to a GTestFatalFunc (it can still be used as a GLogFunc).
Rename test_handle_faults to test_checked_handler and improve its flow and message display. It no longer asserts on a bad match.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21668 57a11ea4-9604-0410-9ed3-97b8803252fd
For use from tests based on glib testing. Create a private structure to
compare to and register a handler which tests the event parameters
against the private structure and counts the number of valid hits.
Provides a test function for checking that the event handler has been
hit the requisite number of times.
Pass through, rather than testing, logs with a lower (i.e., less
important rather than lower-value) loglevel than the one the handler was
set up for. Test the log message rather than overwriting the pre-set one
with the actual message.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21523 57a11ea4-9604-0410-9ed3-97b8803252fd
As usual, re-indentation was done using astyle-1.24 using the following options:
astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21205 57a11ea4-9604-0410-9ed3-97b8803252fd
easier to test callbacks and to intercept and
ignore or test expected error log messages.
Much lifted from Muslim's test-qofbook.c
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20928 57a11ea4-9604-0410-9ed3-97b8803252fd
This also strips trailing whitespaces from lines where they existed.
This re-indentation was done using astyle-1.23 using the following options:
astyle --indent=spaces=4 --brackets=break --pad-oper
Discussed at http://lists.gnucash.org/pipermail/gnucash-devel/2009-August/026121.html
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18535 57a11ea4-9604-0410-9ed3-97b8803252fd
Use shorter strings for commodity mnemonics.
Ensure that test splits amount and value have the same sign.
Avoid numerical overflow in rate calculation when generating test splits.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13718 57a11ea4-9604-0410-9ed3-97b8803252fd
infrastructure. This also replaces the old "Find Transaction"
dialog with the new gnome-search dialog. Registers, Reports, SXs,
etc. all test out fine. Integration with SQL has been "done"
(i.e. it compiles cleanly) but not "tested." Lots of the old code
is still there, but #ifdef'ed out. That code will go away
shortly.
There is only one known loss-of-functionality: the query->xml-v1
converter was not re-implemented. The current intention is, if
this functionality is required, to use the query->scm converter
and then convert the scm->string and insert that into an XML
document.
Fix a Transaction Void bug.
Fix a few bugs in test code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6951 57a11ea4-9604-0410-9ed3-97b8803252fd
* src/test-core/test-stuff.c (get_random_string_without): new func
* src/engine/test-core/test-engine-stuff.c
(get_random_kvp_frame_depth): fix bug
(get_random_session): new func
* src/engine/Account.c (xaccAccountEqual): more warnings, use
gnc_commodity_equal
* src/engine/Group.c (xaccGroupEqual): more warnings
* src/engine/Transaction.c: use gnc_commodity_equal
* src/engine/gnc-book.c (gnc_book_equal): compare commodity tables
* src/engine/gnc-commodity.c (gnc_commodity_equal): new func
(gnc_commodity_table_equal): new func
* src/engine/gnc-session.c (gnc_session_begin): destroy old backend
* src/backend/postgres/test/.cvsignore: ignore test files
* src/backend/postgres/test/Makefile.am: add file backend .la
to get symbols for gdb
* src/backend/postgres/test/run-tests.sh: remove test files
before starting test
* src/backend/postgres/test/test-db.c: when books differ, write
out xml files
* src/backend/file/test/test-xml-account.c (test_add_account):
fix for strong commodity equal test
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5581 57a11ea4-9604-0410-9ed3-97b8803252fd
Distinguish between book full path and book logging path.
Work on test infrastructure.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5437 57a11ea4-9604-0410-9ed3-97b8803252fd
Note to module writers: include gnc-module-api.h to make sure
your signatures are correct.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5168 57a11ea4-9604-0410-9ed3-97b8803252fd