On Fri, Nov 13, 2015, at 10:14 AM, David Faure wrote:
> I have never seen unittests being fully part of the one big monolithic
> application and ran with a command-line argument... but indeed
> that would be one possibility I suppose.

I was thinking more that you have a separate main.o but the other
objects are the same. There's no particular advantage to that, I just
meant that it's all simply object files and executables -- via libraries
is only one of the ways to get there. An unimportant detail at this
point anyway.

> Anyway I like incremental changes so my plan is
> 1) build with cmake exactly what is being built now
> 2) make one big static library with everything except main()
> 3) write a first unit test

Sounds very reasonable to me.

Rosegarden has actually had both a multiple-shared-libraries build
system and a small number of unit tests in the past. The former was a
bit of a pain for reasons Michael touched on, the latter eventually lost
all compatibility with the code around them as nobody ever ran them. For
my part, I didn't really start writing unit tests at all until after the
point I stopped working on RG (sorry). If it's practical to have them
run during every build, that's generally preferable, which means 

> I suppose the best of both worlds would be supporting two modes:
> * without unit tests enabled, one static lib, one executable
> * with unit tests enabled, one shared lib, N executables

could be a good idea, with the first mode being the default installation
mode. Unless that just proves too confusing.

fwiw (which is very little) on other Qt projects these days I generally
use both the Qt test library and Qt Creator (at least on Windows; on
Linux it's Emacs of course, and OS/X I try to avoid editing anything on)


Chris

------------------------------------------------------------------------------
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to