← Back to team overview

dolfin team mailing list archive

Re: Changing naming of cpp unit test files

 

On Wed, Jan 11, 2012 at 12:44:19PM +0100, Johan Hake wrote:
> On Wednesday January 11 2012 12:38:52 Anders Logg wrote:
> > On Wed, Jan 11, 2012 at 10:20:55AM +0000, Garth N. Wells wrote:
> > > On 11 January 2012 09:47, Johan Hake <johan.hake@xxxxxxxxx> wrote:
> > > > Hello!
> > > >
> > > >
> > > >
> > > > While adding a cpp unit test for Vector, I used the convention we have
> > > > started on in the Python layer, where each file in theory should test
> > > > the interface of one class. This does not fit with the way we
> > > > automatically runn the tests, which more or less assume the name of
> > > > the cpp executable is test_XX where XX is the particular sub directory
> > > > (la, mesh, aso).
> > > >
> > > >
> > > >
> > > > I suggest we rename all cpp unit test files in the same way as we have
> > > > for the Python interface. Then we prefix the executable with test_. My
> > > > particular example would then generate an executable with name:
> > > > test_Vector. To accomplish this we need to rename all test.cpp to
> > > > SomeClass.cpp. The change would then be applied to both branches.
> > > >
> > > >
> > > >
> > > > Any objections?
> > >
> > > Sounds good.
> >
> > Agree, but why is it necessary to change this in the 1.0 branch?
>  
> To keep the branches in synch when there are changes that does not change
> anything in the api.
>  
> But I can easily just add my unit test to:
>   test/unit/la/cpp/test.cpp   in the stable branch and we are
> good. However, I think that unit tests are something we should add
> in both branches. Changing the structure to facilitate this process
> should then also be done in both branches.  Johan

ok, I have no objections. But in general, the stable branch should be
for bug fixes and not undergo any restructuring.

--
Anders


Follow ups

References