r21239 - gnucash/trunk/src/engine/test-core - Use the correct #define for the number of account types instead

Mike Alexander mta at code.gnucash.org
Tue Sep 6 03:21:05 EDT 2011


Author: mta
Date: 2011-09-06 03:21:04 -0400 (Tue, 06 Sep 2011)
New Revision: 21239
Trac: http://svn.gnucash.org/trac/changeset/21239

Modified:
   gnucash/trunk/src/engine/test-core/test-engine-stuff.c
Log:
Use the correct #define for the number of account types instead
of assuming that ACCT_TYPE_CREDITLINE is the last one.

Modified: gnucash/trunk/src/engine/test-core/test-engine-stuff.c
===================================================================
--- gnucash/trunk/src/engine/test-core/test-engine-stuff.c	2011-09-04 07:37:57 UTC (rev 21238)
+++ gnucash/trunk/src/engine/test-core/test-engine-stuff.c	2011-09-06 07:21:04 UTC (rev 21239)
@@ -1246,7 +1246,7 @@
 
     set_account_random_string (account, xaccAccountSetName);
 
-    tmp_int = get_random_int_in_range (ACCT_TYPE_BANK, ACCT_TYPE_CREDITLINE);
+    tmp_int = get_random_int_in_range (ACCT_TYPE_BANK, NUM_ACCOUNT_TYPES - 1);
     xaccAccountSetType (account, tmp_int);
 
     set_account_random_string (account, xaccAccountSetCode);



More information about the gnucash-changes mailing list