I would suggest one test per file. That seems to be the most common use
case in my opinion.

I also don't see why you couldn't in theory do both. All files in the top
directory are one test per file. Anything in a sub directory is treated as
all files are compiled to a test.
On Mon, Nov 17, 2014 at 6:06 PM Craig <webe...@gmail.com> wrote:

> Not exactly sure what you mean, but a very common pattern is one unit test
> file for each class (unit) you want to test. This has worked fine for me in
> every language I've worked with.
> On Nov 17, 2014 4:07 PM, "rastersoft" <ras...@rastersoft.com> wrote:
>
> > Hi all:
> >
> > I'm working on adding unitary test support to autovala, but have some
> > doubts that I want to comment here, to ensure that the implementation is
> > right.
> >
> > The first one is how to define each unitary test; my original idea was:
> > "one file, one test", so inside a folder called "unitests" will be as
> many
> > .vala files as unitary tests (even in subfolders). But then I considered
> > that, maybe, some tests are so big that needs several files, in which
> case
> > the way to go would be "one folder, one test", and all the .vala files
> > inside should belong to the same test. Which one is the best approach?
> >
> > The second one is if I should always compile the tests, or do it only if
> > the user sets an specific flag when calling cmake (thus, people just
> > downloading the source and compiling at home wouldn't need to compile
> > everything).
> >
> > Thanks.
> >
> > --
> > Nos leemos
> >                          RASTER    (Linux user #228804)
> > ras...@rastersoft.com              http://www.rastersoft.com
> >
> > _______________________________________________
> > vala-list mailing list
> > vala-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/vala-list
> >
> _______________________________________________
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
_______________________________________________
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to