You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gnucash/libgnucash/engine/test
Maarten Bosmans 0d86be6d2a
[test] Properly destroy resources on end of tests
3 years ago
..
CMakeLists.txt Import GLIB2 as a target, and use it to simplify the CMakeLists 3 years ago
README
gtest-gnc-datetime.cpp Rename GncDateTime's ymd to gnc_ymd to avoid a name conflict with Carbon. 3 years ago
gtest-gnc-euro.cpp Use internal extern "C" { ... } for C++ 3 years ago
gtest-gnc-int128.cpp Remove some unused variables - and the initialization 3 years ago
gtest-gnc-numeric.cpp
gtest-gnc-option.cpp Use internal extern "C" { ... } for C++ 3 years ago
gtest-gnc-optiondb.cpp Use internal extern "C" { ... } for C++ 3 years ago
gtest-gnc-rational.cpp
gtest-gnc-timezone.cpp
gtest-import-map.cpp Remove some unused variables - and the initialization 3 years ago
gtest-qofevent.cpp Remove some unused variables - and the initialization 3 years ago
gtest-qofquerycore.cpp [test] Properly destroy resources on end of tests 3 years ago
test-account-object.cpp [test] Properly destroy resources on end of tests 3 years ago
test-address.c
test-business.c
test-commodities.cpp Use internal extern "C" { ... } for C++ 3 years ago
test-customer.c
test-employee.c
test-engine-kvp-properties.c
test-engine.c
test-gnc-date.c [-Wunused-function] - remove 3 years ago
test-gnc-guid-old.cpp Don't use extern "C" around #includes 3 years ago
test-gnc-guid.cpp Remove references to old boost versions 3 years ago
test-gnc-uri-utils.c
test-group-vs-book.cpp Use internal extern "C" { ... } for C++ 3 years ago
test-guid.cpp Use internal extern "C" { ... } for C++ 3 years ago
test-job.c
test-kvp-frame.cpp
test-kvp-value.cpp [engine] Remove two replace functions from KvpValue 3 years ago
test-load-engine.c
test-lots.cpp [test] Properly destroy resources on end of tests 3 years ago
test-numeric.cpp Use internal extern "C" { ... } for C++ 3 years ago
test-object.c
test-qof-string-cache.c
test-qof.c
test-qofbackend.c
test-qofbook.c Add tests for default invoice report book property 3 years ago
test-qofinstance.cpp [-Wunused-function] - remove 3 years ago
test-qofobject.c Merge Richard Cohen's 'cleanup' into master. 3 years ago
test-qofsession-old.cpp Don't use extern "C" around #includes 3 years ago
test-qofsession.cpp [-Wunused-function] - remove 3 years ago
test-query.cpp [test] Properly destroy resources on end of tests 3 years ago
test-querynew.c
test-recurrence.c
test-split-vs-account.cpp Use internal extern "C" { ... } for C++ 3 years ago
test-transaction-reversal.cpp Use internal extern "C" { ... } for C++ 3 years ago
test-transaction-voiding.cpp Use internal extern "C" { ... } for C++ 3 years ago
test-vendor.c
utest-Account.cpp Don't crash and do pass tests. 3 years ago
utest-Budget.c Remove some unused variables with obviously no side effects 3 years ago
utest-Entry.c
utest-Invoice.c Remove some unused variables with obviously no side effects 3 years ago
utest-Split.cpp Remove some unused variables with obviously no side effects 3 years ago
utest-Transaction.cpp Merge branch 'maint' 3 years ago
utest-gnc-pricedb.c Remove some unused variables with obviously no side effects 3 years ago

README


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."