Re: Tests for the root framework

From: Daniele Nicolodi <daniele_at_grinta.net>
Date: Thu, 2 Mar 2006 02:09:07 +0100


On Thu, Mar 02, 2006 at 01:28:34AM +0100, Christian Holm Christensen wrote:  

> As far as I can gather, most of your tests are in the form of a script
> (possibly compiled), and have semantics like `please test that we can
> fit this kind of data, or we can do this and that.' A `real' unit test
> suite, is more like `for this class/module/... do tests of all
> functionality of this class/module/...'.

Thank you to explain better my idea. I was just meaning that!

> Have you considered using some of the testing frameworks out there? Say
> DejaGNU, cunit, cxxunit, and what not? For a big project like ROOT,
> it's probably not a bad idea to use some sort of time-tested system.

what i like from the python world is also what are called "doctests". Those are snipets of code mixed within documentation of what a class/module is supposed to do. A special python module is used then to run the cide into the documetation and check for the correct output. It is a very good way to document how class/modules are supposed to be used and keep such documentation syncked with the implementation. I don't know if such tools exist also for the c++ world.

> > > The easy solutin to the situation is to have unit tests that cover all
> > > the functionalities of root and run them often on the development trunk.
> > > The best would be to run them after each commit.
>
> I guess you mean you want to run a test on the commited stuff only, right?

Yes. Supposing it is easy to break down the codebase in separate and self contained modules this is what i mean.

> > what the other think
> > > about that?
>
> I was pleased to hear that there _was_ a test suite, but I'd have loved
> to know about it sooner. Ah well.

Nice to see that there is someone that shares my point of view.

Ciao

-- 
Daniele

   Physics is like sex. Sure, it may give some practical results, but
   that's not why we do it.                     -- Richard P. Feynman
Received on Thu Mar 02 2006 - 02:07:37 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:57 MET