test-lots and test-period fixed

Derek Atkins warlord at MIT.EDU
Wed Sep 28 08:47:39 EDT 2005

Neil Williams <linux at codehelp.co.uk> writes:

> I've got a commit to do soon that will fix test-lots and test-period - there 
> were bugs in some of the objects that didn't check that a valid pointer was 
> being passed before trying to modify the object.
> A few if(!xx) { return;} were needed and a few other tweaks.

It might be better to use g_return_if_fail(xx) in this spot...  These
are assertions and it's probably a bug if it's passing in an invalid
object or argument.  So you should use the verbal assertion at this
point because the caller is broken.

> I've also tweaked the output for test-freq-spec and test-lots as
> these run for a long time. They will now output an updating message
> during runtime showing the progress through the test.

Hmm, I never noticed them running for a long time, but..   Okay..

> I've also removed libguile.h from all except two tests (those use scheme) - 
> this made debugging the tests far easier for me.

I don't see why it would make it any more or less easy.  You can apply
gdb in either case to the test app and it just works.  I've never had
a problem debugging the test apps.  But in src/engine I don't think
it's a big deal.

> test-lots now runs without a segfault and all I got is this message:
> FAILURE engine-stuff test-engine-stuff.c:700 get_random_int_in_range failed
> but that doesn't cause the test to fail.

I wonder why?  I also wonder why this is failing?

> After I got it working, I reduced the number of iterations from 100 to 30 so 
> that it took a more reasonable time to complete.

Define "reasonable time"?

> I made the changes in cashutil and will commit them across
> later. Here's part of the summary:

I look forward to seeing the patch.

       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list