Commit Graph

67 Commits

Author SHA1 Message Date
Linas Vepstas
d97831dc8a tweak to attempt to minimize numeric overflows
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10036 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-06-07 03:05:35 +00:00
Derek Atkins
aa3f92a7e2 * src/engine/test-core/test-engine-stuff.c: don't test double
KVPs, on the theory that they will soon be deprecated.
	Fixes #127315


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9750 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-01-02 23:48:47 +00:00
Derek Atkins
e5392da8d6 * src/engine/test-core/test-engine-stuff.c: random queries only
get up to 3 terms, not 4
	* src/app-utils/test/test-scm-query-string.c: loop the test 1000
	  times, now that the queries are smaller.
	Fixes #127492


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9749 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-01-02 23:21:51 +00:00
Derek Atkins
416fd6bb48 * src/engine/test-core/test-engine-stuff.c: don't make a timespec
with tv_sec == 0.  Fixes some tests on the alpha platform.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9685 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-11-17 03:48:17 +00:00
Linas Vepstas
c90c817e64 merge first round of entity rework back into head branch
The net total of this work is (i beleive) fewer lines of code.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9530 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-17 04:25:53 +00:00
Derek Atkins
3331bbe954 * src/engine/engine-helpers.c: turn off scheme garbage collection
during query->scm and scm->query conversion.  It shaves about 50%
	  off the test-scm-query-string tests.
	* src/engine/test-core/test-engine-stuff.c:  add some code to help
	  track down what the get_random_query() is doing.  Turned off by
	  default.
	* src/app-utils/test/test-scm-query-string.c: make the test
	  deterministic by seeding the RNG with a known value.  There is a
	  known "delay" at #245 with a seed of 1 on Linux systems.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9273 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-09-10 00:01:54 +00:00
Linas Vepstas
1752f2c33d remove spectacularly brain-damaged implementation of 'ForEach'
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9097 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-08-16 21:13:31 +00:00
Linas Vepstas
367a8b5f69 rename kvp_frame to KvpFrame to more closely follow gnome naming conventions
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8782 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 23:33:00 +00:00
Linas Vepstas
92a2f26e52 Rename gncbook and gncsession to qofbook and qofsession
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8762 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 02:51:10 +00:00
Linas Vepstas
88c88039dc rename the entity functions from xaccEntity to qof_entity
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8749 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-26 07:30:48 +00:00
Linas Vepstas
8118b2fd69 rename QueryNew to QofQuery
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8721 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-25 07:38:15 +00:00
Linas Vepstas
edfa2f1151 rename gncQueryCore to QofQueryCore
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8701 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-25 05:14:10 +00:00
David Hampton
c1f8f4bbe8 New tests for un-voiding and reversing transactions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8622 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-16 03:52:09 +00:00
Linas Vepstas
7a055accd9 date.h -> gnc-date.h
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8551 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-10 18:18:34 +00:00
David Hampton
2fc7cc7372 Consolidate all the tests for an ISO 4217 commodity into a pair of
functions.  Use these functions throughout the code.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8252 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-04-29 06:15:34 +00:00
Derek Atkins
0f0080c964 Integration of the new Query subsystem, to replace the old Query
infrastructure.  This also replaces the old "Find Transaction"
	dialog with the new gnome-search dialog.  Registers, Reports, SXs,
	etc. all test out fine.  Integration with SQL has been "done"
	(i.e. it compiles cleanly) but not "tested."  Lots of the old code
	is still there, but #ifdef'ed out.  That code will go away
	shortly.

	There is only one known loss-of-functionality: the query->xml-v1
	converter was not re-implemented.  The current intention is, if
	this functionality is required, to use the query->scm converter
	and then convert the scm->string and insert that into an XML
	document.

	Fix a Transaction Void bug.

	Fix a few bugs in test code.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6951 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-06-05 21:59:35 +00:00
Dave Peticolas
d4a459b968 Peter O'Gorman's patch for Max OS X.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6674 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-30 07:38:35 +00:00
Dave Peticolas
dbcc5528c5 Remove unneeded include.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6494 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-02 23:35:19 +00:00
Linas Vepstas
dad6b1f29e add missing include
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6488 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-02 20:53:29 +00:00
Linas Vepstas
8819597b9d cosmetic renaming of PR_AMOUNT->PR_VALUE
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6486 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-02 20:20:37 +00:00
Linas Vepstas
20f13f9cd2 uhh, never mind, revert the last patch
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6475 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-02 06:31:49 +00:00
Linas Vepstas
9c12b44817 commodities belong to books
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6471 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-01-02 04:28:32 +00:00
Dave Peticolas
a02f6e3f4d * src/backend/postgres/test/test-db.c: test rollback
* src/engine/Transaction.c: fix bug in transaction rollback

* src/engine/test-core/test-engine-stuff.h: add test routine

* src/engine/test-core/test-engine-stuff.c: add test routine


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6413 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-12-26 07:14:44 +00:00
Dave Peticolas
ab80a5712f Fix bugs.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6269 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-12-07 11:10:22 +00:00
Dave Peticolas
4a67dfe918 Remove acc_guid member from splits.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6262 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-12-06 09:30:25 +00:00
Dave Peticolas
277b4757a7 Add more account queries to make_trans_query.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6139 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-29 11:09:33 +00:00
Dave Peticolas
6b9dee0392 fix bug
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6055 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-25 09:38:15 +00:00
Linas Vepstas
381504ad5a fix test cases that are wildly misusing internal routines with great borkeness.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6054 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-25 09:10:17 +00:00
Dave Peticolas
fed69ff72c Fix bugs with new book pointers.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6053 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-25 09:05:23 +00:00
Derek Atkins
788d998d6b convert GNCIdType from an enum to a char*
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6035 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-25 02:20:34 +00:00
Linas Vepstas
1ea3b0dbfa add kvp_frame to books; fix misc session->book bugs
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6020 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-24 18:22:57 +00:00
Dave Peticolas
860adf103c Move entity tables from sessions to books.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6018 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-24 12:10:42 +00:00
Dave Peticolas
393ff20342 random_timespec_usec_resolution: new func.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5987 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-23 23:45:45 +00:00
Dave Peticolas
48c7533a8d Prohibit blank kvp keys.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5975 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-22 07:51:06 +00:00
Dave Peticolas
6f28287eac Derek Atkins's patch implementing kvp timespecs in C & scheme.
Implement kvp timespecs in xml.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5942 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-21 09:49:02 +00:00
Dave Peticolas
9ab5664185 Add explicit types to GUID queries.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5862 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-14 09:07:49 +00:00
Dave Peticolas
82e3d5368f Implement kvp queries in postgres backend.
Fix PR_GUID queries in postgres backend.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5804 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-09 11:50:29 +00:00
Dave Peticolas
96254db7a0 Fix bug.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5782 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-07 09:56:15 +00:00
Dave Peticolas
fb1a5ad357 Add voided transactions to random mix.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5779 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-07 08:59:30 +00:00
Dave Peticolas
6b967f410b Allow prices to be excluded on trans queries.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5778 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-07 08:05:16 +00:00
Dave Peticolas
f82f95a0a2 Refactor make_trans_query into engine test-core.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5775 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-06 10:22:42 +00:00
Dave Peticolas
86c55a3e22 Fix query<->scm for new kvp queries.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5772 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-11-06 00:49:46 +00:00
Dave Peticolas
8098a8eacb Fix bug.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5708 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-22 09:01:04 +00:00
Dave Peticolas
59e09a47db Don't insert account into itself.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5692 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-18 22:45:59 +00:00
Dave Peticolas
d3b6891061 Make random changes to prices & commodities.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5684 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-18 09:33:01 +00:00
Dave Peticolas
e362863787 Test adding new transactions & rolling back changed transactions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5679 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-17 23:35:52 +00:00
Dave Peticolas
27ddcdf45e Only use valid account types when creating random accounts.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5672 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-17 09:56:07 +00:00
Dave Peticolas
0f43b340f3 Remove warning.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5663 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-17 01:29:42 +00:00
Dave Peticolas
9afc2fc598 2001-10-16 Dave Peticolas <dave@krondo.com>
* src/engine/test-core/test-engine-stuff.c: work on test
	infrastructure for making changes to existing data

	* src/engine/gnc-book.c: keep backends up to date

	* src/engine/gnc-session.c: keep backends up to date

	* src/backend/postgres/test/db-control.sh: bring down postmaster
	on database create and destroy

	* src/backend/postgres/test/test-db.c: work on single-update
	test

	* src/backend/postgres/txn.c: fix bug -- when deleting splits
	from the database that aren't in the engine, can't use
	xaccSplitLookup.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5661 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-16 09:13:07 +00:00
Dave Peticolas
bcae323c49 Work on test infrastructure.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5658 57a11ea4-9604-0410-9ed3-97b8803252fd
2001-10-16 00:50:01 +00:00