Commit Graph

33 Commits

Author SHA1 Message Date
Richard Cohen
66c5e398ae Change g_assert() -> g_assert_true() in tests
g_assert() can be compiled out, so should not be used for tests

g_assert_true was removed
to fis https://bugs.gnucash.org/show_bug.cgi?id=792008 because
g_assert_true was introduced in glib-2.38 and at the time GnuCash required
only glib-2.26. GnuCash has required glib >= 2.40 since 8acbc41c6 so
g_assert_true can be restored.
2023-07-16 10:09:12 -07:00
luz paz
0be8e05a1b Fix typos and whitespace in test 2022-11-14 12:57:50 -05:00
luz.paz
65bb60d621 Fix typos for gnuchash/ doc/ bindings/ and misc.
Typos found via `codespell -q 3 -D ~/Projects/codespell/codespell_lib/data/dictionary.txt -S *.po,./po,*.min.js,./ChangeLog*,./NEWS,./doc/README*,./AUTHORS,./libgnucash/tax/us/txf-de*,./data/accounts -L ans,cas,dragable,gae,iff,iif,mut,nd,numer,startd,stoll`
2019-09-13 20:26:03 -04:00
Geert Janssens
15a35e6a3b Housekeeping - replace plenty of http links with https
There are more, but these are most common ones.
There are also a number of urls that don't behave well when https, so those are skipped
At some point I have also started marking non-working URLs as [DEAD LINK], though
that's not a full coverage.
2019-06-06 15:52:30 +02:00
Geert Janssens
a9f35ed7ae Lowercase cmake commands
A huge bikeshed fest but it distracted me enough to do it anyway.
2018-05-03 23:18:15 +02:00
Geert Janssens
2498f9393d Update make-testfile for new sourcefile locations 2018-04-26 23:06:36 +02:00
Rob Gowin
54ac7f23e0 Remove Autotools 2018-01-13 12:52:57 -06:00
Geert Janssens
b430744fb5 Merge branch 'maint' 2017-07-10 20:22:35 +02:00
Geert Janssens
b1f9f80110 Add CMakeLists.txt files to dist tarball generated by autotools
This is half of the work to align the cmake and autotools generated dist tarballs.
What's missing in the cmake dist tarball on my system are all the files generated
or installed by running autogen.sh. I can't test this because cmake can't run
my version of automake (1.15), or at least our CMake configuration prevents this from happening.
2017-07-10 20:06:31 +02:00
John Ralls
c8402ad62e Merge CMake Distcheck from 'maint'.
Conflicts:
	CMakeLists.txt
	src/app-utils/CMakeLists.txt
	src/backend/sql/test/CMakeLists.txt
	src/backend/xml/test/CMakeLists.txt
	src/gnome-utils/CMakeLists.txt
	src/import-export/aqb/CMakeLists.txt
	src/import-export/csv-imp/CMakeLists.txt
	src/import-export/csv-imp/test/Makefile.am
	src/import-export/ofx/CMakeLists.txt
	src/import-export/qif-imp/CMakeLists.txt
	src/libqof/CMakeLists.txt
	src/register/ledger-core/CMakeLists.txt
	src/register/register-core/CMakeLists.txt
	src/register/register-gnome/CMakeLists.txt
	src/report/business-reports/CMakeLists.txt
	src/report/locale-specific/us/CMakeLists.txt
	src/report/report-gnome/CMakeLists.txt
	src/report/standard-reports/CMakeLists.txt
	src/report/stylesheets/CMakeLists.txt
2017-07-04 18:36:35 -07:00
Rob Gowin
6b14dc5b59 Implement 'dist', 'distcheck' and 'uninstall' targets for CMake 2017-07-03 16:15:17 -07:00
Geert Janssens
ce748cceb8 Merge branch 'maint'
Resolved conflicts:
	src/import-export/csv-imp/gnc-csv-model.h
	src/libqof/qof/gnc-date.h
	src/optional/gtkmm/test/Makefile.am
2016-01-22 11:43:23 +01:00
Geert Janssens
bd59bab28f Cumulated minor spelling fixes in comments
and other non-code texts
2016-01-20 15:49:48 +01:00
Geert Janssens
aa6b538ecb Merge branch 'maint'
Resolved conflicts:
	src/engine/Split.c
	src/engine/test/utest-Split.cpp
2015-08-04 15:54:27 +02:00
John Ralls
567f61fe3c Add make_testfile suggestion to test-templates README. 2015-07-30 09:56:37 -07:00
John Ralls
a4b0519303 Fix up and improve the Doxygen documentation in unittest-support.h. 2015-07-28 12:44:25 -07:00
John Ralls
2663dc96e2 Improve the test-templates README and update the templates to current practice. 2015-07-28 11:45:34 -07:00
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
Geert Janssens
ae98012d0c Revert "Merge branch 'private-kvp'"
This reverts commit f49983b801, reversing
changes made to acad5a02bb.
2014-05-07 18:32:44 +02:00
John Ralls
291a3abfa3 Add a call to $TESTS_ENVIRONMENT in tests:
So that g_tester-based tests can be set up to use Guile.
2013-11-04 11:40:16 -08:00
John Ralls
ac0e3b36bf Convert - in filenames to _ for function names
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23204 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-03 21:39:11 +00:00
Geert Janssens
84b2428192 Tests: harmonize test initialization
In particular, use qof_init instead of g_type_init. The former
calls the latter by default. Also our current engine code is
heavily dependent on gobject, so it makes sense to initialize it
as early on as possible. Having once central place to do so
will make it easier to fix this if ever we move away from gobject.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22943 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-05-03 12:03:53 +00:00
John Ralls
ca249052bb Update Makefile.decl to a newer version that works with MinGW
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22602 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-01 22:41:49 +00:00
John Ralls
36b58bc44c Fix make-testfile to count references in UI files
Some functions may be called only by callback reference in a GtkBuilder
XML file (*.glade, *.xml, or *.ui). Indicate that usage in the test-file
function summary.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22259 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-07-02 21:24:07 +00:00
John Ralls
6d32b6f693 [Testing] Separate unit test functions from make check functions.
I'd originally put the functions supporting log detection, qof event handling, and mock-counting in test-stuff along with the functions that support the older "make check" integration tests. There are now more unit test support functions than there are of the older functions, so it's time for them to move out on their own.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22132 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-03 21:35:19 +00:00
John Ralls
663c9f9d5b Testing: fix search_local() for detecting callbacks and references.mv
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22121 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-25 16:52:31 +00:00
John Ralls
2066c1d991 Fix omitted "setup" argument to GNC_TEST_ADD insertion.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22120 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-25 16:52:22 +00:00
John Ralls
62cca60116 New Perl program to create a skeleton test file from a C source file.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22073 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-09 00:07:13 +00:00
John Ralls
e8a9591eec [Bug 666329] Empty database after a little while
Create failing test for gnc_sql_commit_edit() showing that it doesn't call book->dirty_cb when the instance gnc_sql_commit_edit() is called on the book itself.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21824 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-01-07 00:53:43 +00:00
John Ralls
5bf627639f [Testing] Add file modeline for emacs
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21522 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-11-05 23:04:11 +00:00
Christian Stimming
c8ec0537bc Re-indentation of source code.
As usual, re-indentation was done using astyle-1.24 using the following options:

  astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21430 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-10-17 19:07:41 +00:00
John Ralls
56f1e28e36 Minor fixes to g_test: Adjust MODULEPATH so that the boundary path delimiters go at invocation; add DEFAULT_INCLUDES to the test_foo_CFLAGS; include the required NULL third arg to g_test_init()
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20121 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-18 18:16:58 +00:00
John Ralls
d8733bf204 Provide glib unit testing template files to make it easier to add unit testing to modules
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20102 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-14 22:03:56 +00:00