gnucash/test-templates
Geert Janssens 45cb5504f3 Merge branch 'private-kvp' into master again
This was done by branching right before the original merge
and redoing a clean merge of the private-kvp branch again.

This result was then cherry-picked onto master with
git cherry-pick <merge-commit> -m 1

It was done like this because git merge would consider
the private-kvp branch already merged even after a revert
(see git-revert man page) and won't allow to merge a
second time on the same branch.

Resolved conflicts:
	README.dependencies
	src/app-utils/gnc-sx-instance-model.c
	src/engine/cap-gains.c
	src/engine/test/Makefile.am
	src/gnome/assistant-hierarchy.c
	src/import-export/import-match-map.c
	src/import-export/import-utilities.c
	src/import-export/ofx/gnc-ofx-kvp.c
	src/libqof/qof/qofbook.cpp
	src/libqof/qof/qofinstance-p.h
	src/libqof/qof/qofinstance.cpp
	src/libqof/qof/test/test-kvp_frame.c
	src/report/report-gnome/gnc-plugin-page-report.c
2014-05-07 18:32:47 +02:00
..
make-testfile Convert - in filenames to _ for function names 2013-10-03 21:39:11 +00:00
Makefile.am [Bug 666329] Empty database after a little while 2012-01-07 00:53:43 +00:00
Makefile.decl Merge branch 'private-kvp' into master again 2014-05-07 18:32:47 +02:00
README Provide glib unit testing template files to make it easier to add unit testing to modules 2011-01-14 22:03:56 +00:00
test-module.c Tests: harmonize test initialization 2013-05-03 12:03:53 +00:00
test-suite.c Re-indentation of source code. 2011-10-17 19:07:41 +00:00
testmain.c Re-indentation of source code. 2011-10-17 19:07:41 +00:00

Unit Test Templates

This directory contains three template files for setting up GLib
g_test operated unit tests in a test directory. If your module
directory doesn't already have one, create a test subdirectory and add
it to configure.ac.

If there is already a test directory with make check tests in it, copy
the contents of the Makefile.am in this directory to the existing
Makefile.am; otherwise, copy the Makefile.am to your test directory.

Copy test-module.c and test-suite.c to your test directory and rename
them appropriately. You will very likely want several copies of
test-suite.c, one corresponding to each c file in the module directory
that you're testing.

Edit the test module file to call the (renamed) test_suite_module() in
each test-suite file. Add tests and fixtures as needed to the
test-suite files and add them to the (renamed) test_suite_module()
function.

Edit Makefile.am according to the comments in the file.

Run autogen.sh and configure. "make check" will run all tests; "make
test" will run only the GLib unit tests not guarded by conditionals
(see test-suite.c).

See http://www.mail-archive.com/gtk-devel-list@gnome.org/msg06994.html
and http://library.gnome.org/devel/glib/stable/glib-Testing.html
for detailed documentation.