From 363cb21f466cecec7d86e8a200a2634e43f46d33 Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Fri, 7 Dec 2001 11:11:08 +0000 Subject: [PATCH] Fix tests. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6270 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/README | 34 +++---------------- src/app-file/test/Makefile.am | 6 +++- src/app-utils/test/Makefile.am | 1 + src/backend/postgres/test/test-db.c | 20 ++++++++--- src/gnome-utils/test/Makefile.am | 1 + .../locale-specific/us/test/Makefile.am | 1 + src/report/report-system/test/Makefile.am | 1 + src/report/standard-reports/test/Makefile.am | 1 + src/report/stylesheets/test/Makefile.am | 1 + src/report/utility-reports/test/Makefile.am | 1 + src/tax/us/test/Makefile.am | 1 + 11 files changed, 33 insertions(+), 35 deletions(-) diff --git a/src/README b/src/README index 58238e63384..375208eed44 100644 --- a/src/README +++ b/src/README @@ -1,35 +1,11 @@ -This directory contains +This directory contains the source for GnuCash. +See README.modules for the layout of the module subdirectories. +The non-module directories are: - calculation: an implementation of a financial calculator, an - amortization scheduler, and an expression parser. doc: various notes about design and the design documentation. - engine: a directory containing a gui-independent accounting engine experimental: for experimental systems. - gnome: most of the code for the gtk/gnome front end. - guile: guile related code including g-wrap bits. + gnome: misc code for the gtk/gnome front end. optional: bits supported via ./configure --enable-* or --with-* args. pixmaps: various runtime images. quotes: code for downloading stock quotes. - register: a directory containg the register object. - scm: all of the scheme code. - -This directory contains a smatttering of gui-independent files. - - Destroy.[ch] -- functions for destroying GUI windows - EuroUtils.[ch] -- implements euro currency conversions - FileBox.h -- generic interface to a file picker dialog - FileDialog.[ch] -- GUI independent functions for saving and loading - GnuCash files. The name of the file is rather - misleading! - MainWindow.h -- generic interface to main GUI window - MultiLedger.[ch] -- utilities for handling and updating multiple - register windows - Refresh.[ch] -- utilities for refreshing GUI windows - SplitLedger.[ch] -- loads a register window with data from the engine - - file-history.h -- interface for saving and restoring file open history - gnc-ui-common.h -- define some GUI abstractions - messages.h - messages_i18n.h -- translatable strings - top-level.h -- generic top-level interfaces - ui-callbacks.h -- an interface that any gnucash gui must support + scm: misc scheme code. diff --git a/src/app-file/test/Makefile.am b/src/app-file/test/Makefile.am index 135eba3b42b..49e8ce7301f 100644 --- a/src/app-file/test/Makefile.am +++ b/src/app-file/test/Makefile.am @@ -10,7 +10,11 @@ GNC_TEST_DEPS := \ --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ --guile-load-dir ${top_srcdir}/src/gnome \ - --library-dir ${top_srcdir}/src/gnome + --guile-load-dir ${top_srcdir}/src/gnome-utils \ + --guile-load-dir ${top_srcdir}/src/report/report-gnome \ + --library-dir ${top_srcdir}/src/gnome \ + --library-dir ${top_srcdir}/src/gnome-utils \ + --library-dir ${top_srcdir}/src/report/report-gnome TESTS_ENVIRONMENT := \ $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS}) diff --git a/src/app-utils/test/Makefile.am b/src/app-utils/test/Makefile.am index 7810cfffbb7..9602ec30199 100644 --- a/src/app-utils/test/Makefile.am +++ b/src/app-utils/test/Makefile.am @@ -9,6 +9,7 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_builddir}/src/engine \ --gnc-module-dir ${top_builddir}/src/calculation \ --gnc-module-dir ${top_builddir}/src/app-utils \ + --gnc-module-dir ${top_builddir}/src/report/report-gnome \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ diff --git a/src/backend/postgres/test/test-db.c b/src/backend/postgres/test/test-db.c index f70009af73f..07ae4df2d5e 100644 --- a/src/backend/postgres/test/test-db.c +++ b/src/backend/postgres/test/test-db.c @@ -299,12 +299,12 @@ remove_unneeded_commodities (GNCSession *session) g_hash_table_destroy (cdi.hash); } -static void -multi_user_get_everything (GNCSession *session, GNCSession *base) +static Query * +make_get_all_query (GNCSession * session) { Query *q; - g_return_if_fail (session); + g_return_val_if_fail (session, NULL); q = xaccMallocQuery (); @@ -318,6 +318,18 @@ multi_user_get_everything (GNCSession *session, GNCSession *base) xaccQuerySetGroup (q, gnc_book_get_group (gnc_session_get_book (session))); + return q; +} + +static void +multi_user_get_everything (GNCSession *session, GNCSession *base) +{ + Query *q; + + g_return_if_fail (session); + + q = make_get_all_query (session); + xaccQueryGetSplits (q); xaccFreeQuery (q); @@ -337,8 +349,6 @@ test_updates (GNCSession *session, const char *db_name, const char *mode, char *filename; gboolean ok; - return TRUE; - g_return_val_if_fail (session && db_name && mode, FALSE); filename = db_file_url (db_name, mode); diff --git a/src/gnome-utils/test/Makefile.am b/src/gnome-utils/test/Makefile.am index cec24243f11..cdff588eaf6 100644 --- a/src/gnome-utils/test/Makefile.am +++ b/src/gnome-utils/test/Makefile.am @@ -8,6 +8,7 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_builddir}/src/calculation \ --gnc-module-dir ${top_builddir}/src/app-utils \ --gnc-module-dir ${top_builddir}/src/gnome-utils \ + --gnc-module-dir ${top_builddir}/src/report/report-gnome \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ diff --git a/src/report/locale-specific/us/test/Makefile.am b/src/report/locale-specific/us/test/Makefile.am index 53ee3b39e68..32d4174082c 100644 --- a/src/report/locale-specific/us/test/Makefile.am +++ b/src/report/locale-specific/us/test/Makefile.am @@ -13,6 +13,7 @@ GNC_TEST_DEPS := \ --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ --guile-load-dir ${top_srcdir}/src/gnome-utils \ + --gnc-module-dir ${top_builddir}/src/report/report-gnome \ --guile-load-dir ${top_srcdir}/src/gnome \ --library-dir ${top_srcdir}/src/gnome-utils \ --library-dir ${top_srcdir}/src/gnome diff --git a/src/report/report-system/test/Makefile.am b/src/report/report-system/test/Makefile.am index 7b5397f1a5d..727f7f38e26 100644 --- a/src/report/report-system/test/Makefile.am +++ b/src/report/report-system/test/Makefile.am @@ -8,6 +8,7 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_builddir}/src/calculation \ --gnc-module-dir ${top_builddir}/src/app-utils \ --gnc-module-dir ${top_builddir}/src/report/report-system \ + --gnc-module-dir ${top_builddir}/src/report/report-gnome \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ diff --git a/src/report/standard-reports/test/Makefile.am b/src/report/standard-reports/test/Makefile.am index cd28e61ff73..f41e554ed9b 100644 --- a/src/report/standard-reports/test/Makefile.am +++ b/src/report/standard-reports/test/Makefile.am @@ -10,6 +10,7 @@ GNC_TEST_DEPS := \ --guile-load-dir ${top_builddir}/src/scm \ --guile-load-dir ${top_builddir}/lib \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ + --gnc-module-dir ${top_builddir}/src/report/report-gnome \ --guile-load-dir ${top_builddir}/src/gnome-utils \ --guile-load-dir ${top_builddir}/src/gnome \ --library-dir ${top_builddir}/src/gnome-utils \ diff --git a/src/report/stylesheets/test/Makefile.am b/src/report/stylesheets/test/Makefile.am index 1420f9dd665..2b8a9c60d8f 100644 --- a/src/report/stylesheets/test/Makefile.am +++ b/src/report/stylesheets/test/Makefile.am @@ -12,6 +12,7 @@ GNC_TEST_DEPS := \ --guile-load-dir ${top_builddir}/lib \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ --guile-load-dir ${top_builddir}/src/gnome-utils \ + --gnc-module-dir ${top_builddir}/src/report/report-gnome \ --guile-load-dir ${top_builddir}/src/gnome \ --library-dir ${top_builddir}/src/gnome-utils \ --library-dir ${top_builddir}/src/gnome diff --git a/src/report/utility-reports/test/Makefile.am b/src/report/utility-reports/test/Makefile.am index 2c81dfd931b..a27501c3ae7 100644 --- a/src/report/utility-reports/test/Makefile.am +++ b/src/report/utility-reports/test/Makefile.am @@ -10,6 +10,7 @@ GNC_TEST_DEPS := \ --guile-load-dir ${top_builddir}/src/scm \ --guile-load-dir ${top_builddir}/lib \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ + --gnc-module-dir ${top_builddir}/src/report/report-gnome \ --guile-load-dir ${top_builddir}/src/gnome-utils \ --guile-load-dir ${top_builddir}/src/gnome \ --library-dir ${top_builddir}/src/gnome-utils \ diff --git a/src/tax/us/test/Makefile.am b/src/tax/us/test/Makefile.am index a04065d6855..c3abe1b86de 100644 --- a/src/tax/us/test/Makefile.am +++ b/src/tax/us/test/Makefile.am @@ -7,6 +7,7 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_builddir}/src/report/report-system \ --gnc-module-dir ${top_builddir}/src/report/utility-reports \ --gnc-module-dir ${top_builddir}/src/report/stylesheets \ + --gnc-module-dir ${top_builddir}/src/report/report-gnome \ --gnc-module-dir ${top_builddir}/src/app-utils \ --gnc-module-dir ${top_builddir}/src/calculation \ --gnc-module-dir ${top_builddir}/src/tax/us \