gnucash/libgnucash/engine/test
John Ralls 95487eb4a0 Merge branch 'maint'
# Conflicts:
#	gnucash/gnome/window-reconcile2.c
#	libgnucash/app-utils/options.scm
#	libgnucash/engine/gnc-numeric.cpp
2022-04-14 18:02:17 -07:00
..
CMakeLists.txt
dummy.cpp
gtest-gnc-datetime.cpp Fix various typos 2022-04-08 14:12:50 -04:00
gtest-gnc-int128.cpp
gtest-gnc-numeric.cpp
gtest-gnc-rational.cpp
gtest-gnc-timezone.cpp
gtest-import-map.cpp
gtest-qofquerycore.cpp
README
test-account-object.cpp
test-address.c
test-business.c
test-commodities.cpp [test-commodities.cpp] add kvp setter/getter test 2021-08-31 23:16:42 +08:00
test-customer.c
test-employee.c
test-engine-kvp-properties.c
test-engine.c
test-gnc-date.c
test-gnc-guid-old.cpp
test-gnc-guid.cpp
test-gnc-uri-utils.c
test-group-vs-book.cpp
test-guid.cpp
test-job.c
test-kvp-frame.cpp
test-kvp-value.cpp
test-load-engine.c
test-lots.cpp [test-lots.cpp] add kvp getter/setter changes 2021-08-31 23:16:43 +08:00
test-numeric.cpp
test-object.c
test-qof-string-cache.c
test-qof.c
test-qofbackend.c
test-qofbook.c
test-qofinstance.cpp
test-qofobject.c
test-qofsession-old.cpp
test-qofsession.cpp
test-query.cpp
test-querynew.c
test-recurrence.c
test-split-vs-account.cpp
test-transaction-reversal.cpp
test-transaction-voiding.cpp
test-vendor.c
utest-Account.cpp [utest-Account] test old dxaccAccount* functions 2021-09-19 11:27:03 +08:00
utest-Budget.c Use C++ STL instead of GLib 2022-03-02 07:36:59 +08:00
utest-Entry.c
utest-gnc-pricedb.c [utest-gnc-pricedb] add tests for gnc_price_list_equal 2021-10-18 22:25:21 +08:00
utest-Invoice.c [utest-Invoice.c] add kvp getter/setter tests 2021-08-31 23:16:43 +08:00
utest-Split.cpp [Split.c] return price==0 instead of 1, if !split, or amt==0 2022-01-10 19:19:25 +08:00
utest-Transaction.cpp [utest-Transaction] add tests for xaccTransGetReadOnly 2021-09-25 13:27:56 +08:00

This directory contains unit test cases to exercise basic 
GnuCash engine functions.

To run the tests, just do 'make check'


Notes on test of dirty/clean flag:
---------------------------------
This test is currently performed in part in
test-customer
test-employee
test-job
test-vendor

The test cases will check if the dirty flag is unset on creation
of an object and if the dirty flag is set when the object
is modified.

There used to be a test also to check if the dirty flag is
cleared again upon committing the change.
This test has been removed, because it can only be successful
if a backend is set up. That's because the 'dirty' flag is
supposed to be cleared by the backend only.

We are in the engine test code however. In here it's not possible
to load a backend without creating some circular dependencies
between gnucash modules.

Just for completeness, this was said on the dirty flag tests before
these test cases got moved to the engine:
"An object cannot be marked 'clean' unless it has actually
been saved to a file or sql db.  (Or, in the case of the file 
backend, the 'dirtiness' of the data has been duly noted, and
will be taken care of for the next file save. 
Until its saved, it lives in perpetual dirtiness.  Thus, the 
test cases need to specify a backend, then do the commit, 
then test the dirty flag.

Actually, the use of the dirty flag in gnucash is, at this time,
mildly ambiguous, and its semantics are not clearly defined."