r21523 - gnucash/trunk/src/test-core - [Testing] Test facility for QofEvents and improve fatal-handling

John Ralls jralls at code.gnucash.org
Sat Nov 5 19:04:23 EDT 2011

Author: jralls
Date: 2011-11-05 19:04:23 -0400 (Sat, 05 Nov 2011)
New Revision: 21523
Trac: http://svn.gnucash.org/trac/changeset/21523

[Testing] Test facility for QofEvents and improve fatal-handling

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.

More information about the gnucash-patches mailing list