gnucash/libgnucash/engine/test
John Ralls 226bfea108 Fix a bunch of UB errors from ASAN about mismatched function types.
The casts fool the compiler but not the UB sanitizer.
2024-02-20 15:33:11 -08:00
..
CMakeLists.txt Restore test-gnc-option 2023-06-06 15:34:07 +01:00
gtest-gnc-datetime.cpp Use gnc_time() instead of time() 2023-06-06 15:40:36 +01:00
gtest-gnc-euro.cpp Use internal extern "C" { ... } for C++ 2023-01-23 18:40:01 +00:00
gtest-gnc-int128.cpp Remove some unused variables - and the initialization 2023-02-06 14:20:28 +00:00
gtest-gnc-numeric.cpp [gtest-gnc-numeric] add operator comparisons 2024-01-29 08:55:56 +08:00
gtest-gnc-option.cpp Fix GncOptionMultichoiceValue list tests 2023-07-20 21:24:31 -07:00
gtest-gnc-optiondb.cpp Restore test-gnc-option 2023-06-06 15:34:07 +01:00
gtest-gnc-rational.cpp Restructure the src directory 2017-08-10 18:45:00 +02:00
gtest-gnc-timezone.cpp Bug 798150 - Error on report over time 2021-03-21 15:55:08 -07:00
gtest-import-map.cpp Fix global array index out of range. 2023-11-17 15:20:29 -08:00
gtest-qofevent.cpp Remove some unused variables - and the initialization 2023-02-06 14:20:28 +00:00
gtest-qofquerycore.cpp Valgrind: fix "definitely lost" memory in test - test-qofquerycore 2023-07-19 10:21:30 +01:00
README Restructure the src directory 2017-08-10 18:45:00 +02:00
test-account-object.cpp [test] Properly destroy resources on end of tests 2023-04-02 21:12:50 +02:00
test-address.c Valgrind: fix "definitely lost" memory from get_random_string() - test-address 2023-07-20 15:22:52 +01:00
test-business.c Drop all gnc-module dependencies and includes from compilation units that no longer use it 2020-04-24 22:16:24 +02:00
test-commodities.cpp removed old_internal_name from gnc_quote_source_s (deprecated) 2024-02-17 22:52:40 +08:00
test-customer.c Valgrind: fix "definitely lost" memory from get_random_string() - test-customer 2023-07-20 15:23:01 +01:00
test-employee.c Valgrind: fix "definitely lost" memory from get_random_string() - test-employee 2023-07-20 15:23:05 +01:00
test-engine-kvp-properties.c Change g_assert() -> g_assert_true() in tests 2023-07-16 10:09:12 -07:00
test-engine.c Enable gnc-uri test suite 2018-12-27 20:53:33 +01:00
test-gnc-date.c Update test-gnc-date.c 2023-12-07 17:31:19 -08:00
test-gnc-guid-old.cpp Change g_assert() -> g_assert_true() in tests 2023-07-16 10:09:12 -07:00
test-gnc-guid.cpp Remove references to old boost versions 2023-02-27 11:48:09 +00:00
test-gnc-uri-utils.c gnc-uri - refer to 'scheme' instead of 'protocol' as that's the more formal term used in uris 2018-12-27 22:33:17 +01:00
test-group-vs-book.cpp Use internal extern "C" { ... } for C++ 2023-01-23 18:40:01 +00:00
test-guid.cpp Fix UAF in xaccFreeSplit. 2023-11-02 12:58:55 -07:00
test-job.c [test-job] plug leaks 2023-09-15 23:34:43 +08:00
test-kvp-frame.cpp Housekeeping - replace plenty of http links with https 2019-06-06 15:52:30 +02:00
test-kvp-value.cpp Valgrind: fix "Invalid read" - test-kvp-value 2023-06-21 10:36:35 +01:00
test-load-engine.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
test-lots.cpp [test] Properly destroy resources on end of tests 2023-04-02 21:12:50 +02:00
test-numeric.cpp Make the GncNumeric string constructtor work for long decimal numbers. 2023-05-18 17:42:44 -04:00
test-object.c Fix typos in libgnucash/ 2021-03-02 01:15:32 +01:00
test-qof-string-cache.c Change g_assert() -> g_assert_true() in tests 2023-07-16 10:09:12 -07:00
test-qof.c Bug 796989 - some date/time does not honor user locale (bis). 2019-02-19 09:49:56 -08:00
test-qofbackend.c Restructure the src directory 2017-08-10 18:45:00 +02:00
test-qofbook.c Fix UAF in xaccFreeSplit. 2023-11-02 12:58:55 -07:00
test-qofinstance.cpp Change g_assert() -> g_assert_true() in tests 2023-07-16 10:09:12 -07:00
test-qofobject.c Fix UAF in xaccFreeSplit. 2023-11-02 12:58:55 -07:00
test-qofsession-old.cpp Change g_assert() -> g_assert_true() in tests 2023-07-16 10:09:12 -07:00
test-qofsession.cpp [test-qofsession] plugs Account* leak 2023-09-17 08:37:09 +08:00
test-query.cpp [test] Properly destroy resources on end of tests 2023-04-02 21:12:50 +02:00
test-querynew.c Prevent gcc from searching config.h in the current directory 2017-10-26 14:05:17 +02:00
test-recurrence.c Bug 797666 - libgnucash/engine/test/test-recurrence.c: In function 'check_valid': 'result' may be used uninitialized 2020-04-05 12:06:02 -07:00
test-split-vs-account.cpp Use internal extern "C" { ... } for C++ 2023-01-23 18:40:01 +00:00
test-transaction-reversal.cpp Use internal extern "C" { ... } for C++ 2023-01-23 18:40:01 +00:00
test-transaction-voiding.cpp Use internal extern "C" { ... } for C++ 2023-01-23 18:40:01 +00:00
test-vendor.c Valgrind: fix "definitely lost" memory from get_random_string() - test-vendor 2023-07-20 15:23:09 +01:00
utest-Account.cpp Fix a bunch of UB errors from ASAN about mismatched function types. 2024-02-20 15:33:11 -08:00
utest-Budget.c Change g_assert() -> g_assert_true() in tests 2023-07-16 10:09:12 -07:00
utest-Entry.c Change g_assert() -> g_assert_true() in tests 2023-07-16 10:09:12 -07:00
utest-gnc-pricedb.c Bug 799143 - FTBFS on 32bit architectures 2023-11-28 01:47:12 +00:00
utest-Invoice.c Change g_assert() -> g_assert_true() in tests 2023-07-16 10:09:12 -07:00
utest-Split.cpp Fix a bunch of UB errors from ASAN about mismatched function types. 2024-02-20 15:33:11 -08:00
utest-Transaction.cpp Fix a bunch of UB errors from ASAN about mismatched function types. 2024-02-20 15:33:11 -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."