Thank you, Stephan, for your thoughtful response.

On Wed, 2010-02-24 at 09:31 +0100, Stephan Bergmann wrote:
> - All directories containing test code are added to the modules' 
> prj/build.lst files.  

I'll take that as my first reading assignment.

> Reading:  For how to write tests, I would suggest the generic testing 
> and xUnit literature.  

Ah.  That provoked me to google more widely.  Suddenly I see lots of
things.

> Let me know if you have any trouble going forward.  Maybe you can 
> explain a concrete thing you would like to write a test for, and we can 
> see how to get started with that concrete example.

I am looking at issue 109146 "Assertion: Error: seekEntry() Bad map ..."
<http://www.openoffice.org/issues/show_bug.cgi?id=109146>.  It just
happens to be the first assertion that I saw triggered in my first
non-product build.

The failing assertion is in a function defined outside of any class, but
the cppunit tutorials I have found all have object-oriented examples.
I'll see how I get along.

One good test is to make the unchanged assertion fire, right?  To
accomplish this under different compilers, I think the test program is
going to compare the addresses of independent variables, and that gives
results which are not defined by the C++ standard.  (Well, that's if my
very old memory is correct.)  Anyway, before this is done, I shall need
help to find a compiler which sends the test program down the "other"
path by allocating stack variables in the other order.

That same test will have to cast away constness of
MediaTypeEntry::m_pTypeName, and that is a bad thing to do.  But I am
*trying* to screw things up.  Does that give me a pass?

Again, thank you for your patience.

Cheers,
Terry.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org

Reply via email to